Threaded Code

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, thro’an 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 (1869–1943)

    Acknowledge your will and speak to us all, “This alone is what I will to be!” Hang your own penal code up above you: we want to be its enforcers!
    Friedrich Nietzsche (1844–1900)