In computer science, the term threaded code refers to a compiler implementation technique where the generated code has a form that essentially consists entirely of calls to subroutines. The code may be processed by an interpreter, or may simply be a sequence of machine code call instructions.
Threaded code has better code density than code generated by alternative code generation techniques and alternative calling conventions, at the expense of slightly slower execution speed (usually only one machine instruction). However, a program small enough to fit fully in a computer processor's cache may run faster than a larger program that suffers many cache misses.
Threaded code is best known as the implementation technique commonly used in some programming languages, such as Forth, many implementations of BASIC, some implementations of COBOL, early versions of B, and other languages for small minicomputers and amateur radio satellites.
Read more about Threaded Code: Preparatory History, Development, Threading Models, Branches, Common Amenities
Famous quotes containing the words threaded and/or code:
“Two children, all alone and no one by,
Holding their tattered frocks, throan airy maze
Of motion lightly threaded with nimble feet
Dance sedately; face to face they gaze,
Their eyes shining, grave with a perfect pleasure.”
—Laurence Binyon (18691943)
“...I had grown up in a world that was dominated by immature age. Not by vigorous immaturity, but by immaturity that was old and tired and prudent, that loved ritual and rubric, and was utterly wanting in curiosity about the new and the strange. Its era has passed away, and the world it made has crumbled around us. Its finest creation, a code of manners, has been ridiculed and discarded.”
—Ellen Glasgow (18731945)