This page is a collection of my favorite resources for people getting started writing programming languages. I hope to keep it updated as long as I continue to find great stuff.
I made a fun compilers t-shirt and also a fun JIT compilers t-shirt
Here are some resources I have found useful for understanding the ideas and research around optimizing dynamic languages.
CodeStubAssemblerAnd here are runtime optimization resources that I wrote!
Resources on representing small values efficiently.
Small JITs to help understand the basics. Note that these implementations tend to focus on the compiling ASTs or IRs to machine code, rather than the parts of the JIT that offer the most performance: inline caching and code inlining. Compiling is great but unless you’re producing good machine code, it may not do a whole lot.
Sometimes you want to generate assembly from a host language. Common use cases include compilers, both ahead-of-time and just-in-time. Here are some libraries that can help with that.
For more inspiration, check out some of the assemblers in runtimes I mention in my Compiling a Lisp post.
I have not written much about runtime optimization yet, but I would like to write about:
cmp/jmp and stub, and a
C++ wrapper
(How does V8 do it?
Hotspot?
Dart (maybe)? JSC?)