Two little interpreters (article + code)
(dubroy.com)
from armchair_progamer@programming.dev to programming_languages@programming.dev on 27 Mar 2024 15:47
https://programming.dev/post/12001834
from armchair_progamer@programming.dev to programming_languages@programming.dev on 27 Mar 2024 15:47
https://programming.dev/post/12001834
The author wrote a tiny AST and bytecode interpreter to test which is faster (related to the paper “AST vs. Bytecode: Interpreters in the Age of Meta-Compilation”).
Tl;dr; like in the paper, the AST interpreter is faster.
Keep in mind the “meta-compilation”: the AST or bytecode interpreter itself runs in a JIT interpreter, in the author’s tests V8 or JSC.
threaded - newest