5 ms·
tcc (The tiny C commpiler originally made by Fabrice Bellard) is still actively maintained and is surprisingly fast. tcc does compile, link AND run the program
by stephc_int13 4y ago
tcc (The tiny C commpiler originally made by Fabrice Bellard) is still actively maintained and is surprisingly fast.
tcc does compile, link AND run the program directly on several platforms, including windows.
If you can live with C99 it is a very good fast-iteration system.
I think the codebase could also be used as a starting point for a fast linker-loader.
- badpun 4y agoAlso, the wave of programming languages started by Jonathan Blow talks (jai, zig etc.) all focus on very fast compile times even for large code bases. So, hopefully hot reload will be less of a need in a couple of years (when these languages mature).
- pjmlp 4y agoIt is kind of ironic that we had to wait 20 years to get back what Delphi, Eiffel and co have been offering for decades, in much more resource constrained hardware.
- stephc_int13 4y agoHot reload would still be an improvement on top of fast compile time, but yeah, the most important part is the compile/link part of the iteration. Saving/reloading state could be done at the framework level, and it can't work in all cases (typically when memory layout is changed between iterations). But I think that we collectively realized how slow compilers had become only recently (something like five years ago) because it was a slow boil frog situation.
- exebook 4y agoRegardless how fast zig compiler self is, as far as it outsources code generation to llvm and linking to ld it will always be much slower than tinycc. Although recently I've noticed that if you ask llvm to generate and execute something they call bitcode, the code generation seemed faster.
- deleted 4y ago[deleted]