Optimizing compilation notes
January 28, 2025 ยท View on GitHub
View this file with results and syntax highlighting here.
Optimizing compilation notes
Pages in this directory discuss advanced compilation strategies for BQN, that is, steps that might take take place after compiling to bytecode or a similar intermediate representation. Most content here is currently speculative: C, Java, and Javascript backends are capable of compiling to native (x86, JVM, or Javascript) code in order to lower evaluation overhead but don't perform much if any analysis to improve this code. CBQN is likely to start making such optimizations in the future.
- Array language compilation in context, an introduction to the subject
- Dynamic compilation, discussing high-level strategies
- Loop fusion in array languages
The self-hosted bytecode compiler isn't really documented, but there are some related resources elsewhere. I held a few early chat discussions on building an array-based compiler, but aborted these because the interactive format wasn't doing too much.
- Comparison to Co-dfns, the other array-based compiler (plus the newer Pareas).
- Chat: Parenthesis nesting level
- Chat: Infix to RPN
- Chat: Parsing expressions with parentheses