スレッデッドコード
Sign in to saveprogram whose source code consists entirely of calls to functions
Article · 日本語
スレッデッドコード(英: threaded code)は、プログラミング言語処理系におけるコード生成手法のひとつで、呼出すべきサブルーチンのアドレスを羅列する、というものである。「内部インタプリタ」と呼ばれる極小のインタプリタで順次呼出したり、サブルーチン・スレッディング方式と言われるコンパイル手法の場合は機械語のサブルーチンコール命令の羅列になっているので、先頭にジャンプ(ないし呼出し)してそのまま実行する。 スレッデッドコードは、他のコード生成技法や他の呼出規約よりもコード密度が高いが、若干実行速度が遅くなる(通常、1命令多くなる)。しかし、プログラムが小さくなるのでCPUのキャッシュに完全に収まる可能性が高くなり、キャッシュミスが起きにくくなって性能が向上する可能性が高い。 スレッデッドコードは、Forth、多くのBASICの実装、一部のCOBOLの実装、初期のB言語、小型ミニコンピュータ向けなどのプログラミング言語での実装技法としてよく知られている。
Abstract from DBpedia / Wikipedia · CC BY-SA
Connections
cache
Entity
processor register
Entity
instruction set architecture
Entity
program counter
Entity
Byte
Entity
computer science
Entity
International Standard Book Number
Entity
Q15777
Entity
programming language
Entity
Java
Entity
computer hardware
Entity
Wayback Machine
Entity
digital object identifier
Entity
compiler
Entity
Q81571
Entity
Q42979
Entity
Dennis M. Ritchie
Entity
object-oriented programming
Entity
source code
Entity
Hewlett-Packard
Company