Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Threaded code is a compiler implementation technique that is used to implement virtual machine interpreters. The code that is generated by the threaded code mostly contains calls to subroutines. This code could also be a simple sequence of machine call instructions or perhaps a code that needs to be processed by a machine interpreter. Threaded code is the implemented method in programming languages like FORTH, most implementations of BASIC and some versions of COBOL. One of the prominent features of threaded code is that compared to other code generation methods, it has a higher code density. At the same time, the execution speed is slightly slower than the codes generated by alternative methods.