Optimum programming
In the history of computing, optimum programming, or optimum coding is the practice of arranging a computer program's instructions in memory so as to minimize the time the machine spends waiting for instructions. It is of historical interest mainly due to the design of many early digital computers.
Most early computers used some form of serial memory, primarily delay-line memory or magnetic drums. Unlike the random-access memory of modern computers, words in serial memory are made available one at a time; the time required to access a particular word depends on the "distance" between it and the word currently being read. If a given delay line held n words, the average time to read a word would be n/2 word times. Without optimum coding, such a machine would spend most of its time idly waiting for instructions and data.[1]
To circumvent this problem, many machines, particularly Alan Turing's ACE and its descendants, included a field specifying the address of the next instruction to be executed in their instruction format. A programmer employing optimum coding would look up the time needed to perform the current instruction, calculate how far the memory system would move in that time, and then place the next instruction for the program at that location. Thus when the current instruction completed and the computer looked for the next one as specified in the instruction, that memory location would just be arriving and would be able to be read in immediately. For example, if a programmer had just coded an ADD instruction at address 400, and the ADD instruction required 4 word-times to execute, the programmer would set the "next address" field of the instruction to 404, and would place the next instruction there.
In the United States, optimum coding was most commonly employed on the IBM 650[2] and the Bendix G-15. Both machines had optimizing assemblers (SOAP for the IBM, POGO for Bendix) that could automate this task.
See also
- Mel Kaye, who authored one particularly clever bit of optimum programming that has entered computer lore, is described in The Story of Mel.
References
- ^ IBM SOAP Manual.
- ^ Kugel, Herb (October 22, 2001). "The IBM 650". Dr. Dobb's.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.