I've been working on a scaffold to teach an agent how to build a self-hosting C++ Compiler from scratch for the past 6 months. One of my recent agent-runs recently achieved self-hosting for less than $500 in API tokens, but the most interesting part is that the reference implementation (which takes the best ideas from every run) can now compile C++ code 4x faster than GCC and Clang.
Comments
spacedcowboy•59m ago
Whereas this is very impressive, I feel “faster than” should be called out as “faster to compile than”. It’s generated code seems “on a par with”.
vishvananda•40m ago
Yes, agreed. "Faster to compile" can also be interpreted as the time to compile the compiler itself, so rather than try to disambiguate in the title, I just went with the short version.
spacedcowboy•59m ago
vishvananda•40m ago
The breakdown is roughly:
* Compiling a TU (Unoptimized): ~2.5x
* Compiling a TU (Optimized): ~4x
* Generated Code Speed (Unoptimized): ~1.01x
* Generated Code Speed (Optimized): 0.99x