
SquirrelFish is a register-based, direct-threaded, high-level bytecode engine, with a sliding register window calling convention. It lazily generates bytecodes from a syntax tree, using a simple one-pass compiler with built-in copy propagation.
SquirrelFish’s bytecode engine elegantly eliminates almost all of the overhead of a tree-walking interpreter.
- First, a bytecode stream exactly describes the operations needed to execute a program. Compiling to bytecode implicitly strips away irrelevant grammatical structure.
- Second, a bytecode dispatch is a single direct memory read, followed by a single indirect branch. Therefore, executing a bytecode instruction is much faster than visiting a syntax tree node.
- Third, with the syntax tree gone, the interpreter no longer needs to propagate execution state between syntax tree nodes.
출처: Announcing SquirrelFish via Simon Willison’s Weblog
P.S> SquirrelFish - Wikipedia
댓글 없음:
댓글 쓰기