3 ms·
Ask HN: Fast compilers for statically typed languages?
I am looking for FOSS, production-quality native compilers for statically typed languages that make the compile-run cycle fast enough to compete with scripting language interpreters. Go's gc is the most often mentioned compiler in this category but there must be others (e.g., FPC [1] comes to mind). Please share any such compilers that you know and what your experience has been with them.
[1] http://www.freepascal.org/
- fiedzia 10y agoBig +1 for fpc, though its been long time since I've used it.
- JoachimSchipper 10y agogcc is plenty fast at lower optimization levels. And if you want to get funky about it, http://www.bellard.org/tcc/tccboot.html http://www.bellard.org/tcc/tccboot.html shows that tcc can compile Linux fast enough for a source-only bootloader. ;-) (The chief downside of compiling with less than gcc -O2 is that dataflow analysis is not done at lower optimization levels, which means that you'll miss some "unused variable" and/or "dead store" warnings.)
- swah 10y agoOCaml used to be super fast, IIRC.
- vram22 10y agoD's DMD compiler on Windows seems somewhat fast or at least not slow. This is subjective and only based on small programs I've been compiling. Cannot say if the same scales to larger programs with many more LOC. However they do claim on their site that D is suitable for projects with millions of lines of code. Can say the same about FreePascal, again for small programs. Very fast to compile, even from the CUI IDE.