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)

    Wise Draco comes, deep in the midnight roll
    Of black artillery; he comes, though late;
    In code corroborating Calvin’s creed
    And cynic tyrannies of honest kings;
    He comes, nor parlies; and the Town, redeemed,
    Gives thanks devout; nor, being thankful, heeds
    The grimy slur on the Republic’s faith implied,
    Which holds that Man is naturally good,
    And—more—is Nature’s Roman, never to be
    scourged.
    Herman Melville (1819–1891)