ASTro: An AST-based Reusable Optimization Framework
summary
Describes a lightweight partial-evaluation framework that generates specialized C dispatchers from node-centric AST interpreters, claiming plain C output that mainstream compilers inline aggressively and yield competitive native code. Includes a generator, ASTroGen under 500 lines Ruby, and a Merkle-tree micro hash per AST subtree so compiled fragments are shared across processes and machines. Prototype (Naruby subset: 21 types, ~300 node defs) compiles with GCC and RISC‑V toolchains and shows improved microbenchmark speed versus a tree-walking baseline.
AI-written summary · about
chapters (10)
- 0:00ASTro framework intro
- 1:45Traditional interpreter challenges
- 3:13Motivation for lightweight partial eval
- 6:06ASTro specialized interpreters
- 9:46Demo minimal language
- 15:31Micro hash code reuse
- 16:36Partial evaluation with ASTro
- 19:35Preliminary eval with Narubi
- 21:23Conclusion open questions
- 22:07Q&A
related talks
31mThe AST Galaxy to the Virtual Machine Blues
29mAutomatically Generated Supernodes for AST Interpreters Improve Virtual-machine P...
33mRuby the Hard Way: Writing Bytecode to Optimize Plain Ruby
17mAST vs. Bytecode: Interpreters in the Age of Meta-Compilation
42mData All The ASTs
26mAn Analysis of Compiled Code Reusability in Dynamic Compilation
15mFast & Easy ASTs for Flexible Embedded Interpreters
49mA Raku API to Raku programs the journey so far
