4 ms·
I have never understood this fetish for short compilation times. Compilation time is an extremely good investment if it lets me express exactly what I need and
by pif 6y ago
I have never understood this fetish for short compilation times.
Compilation time is an extremely good investment if it lets me express exactly what I need and gives me the fastest possible program as a result.
- enqk 6y agoWhen building programs with user interfaces*, there are parts that _cannot_ be tested formally with either types or automated tests, because they require a human to test how things "feel." In that context, long compile times lengthen the build-evaluate feedback loop to a point that harms quality. * also note that APIs are user interfaces. So this harms way more than just programs with GUIs.
- yamrzou 6y agoSame for data analysis. It is mostly exploratory and iterative work, with the need for a feeback loop (making plots, checking for unusual values, etc.) because the input data is unpredictable. That's why data scientists prefer interpreted languages and Jupyter Notebooks.
- pif 6y agoThat's also why you get the -O0 and -O3 options.
- lapinot 6y agoThis. Big part of the most high-performance code (like crypto, linear-algebra or fft kernels) are even generated: you build a program that will generate a program that will get compiled (or is already asm). One can arguably say that the generator program is part of the compiler chain (takes parameters describing some algorithm and generates executable code). And these generators sometimes call out to SMT solvers or otherwise solve complicated algorithmic problems (integer programming problems for vectorizing with the polyhedral model). Hence these are specialized high-level compilers that take a long time to output extremly fast and small programs. Most people don't call the generators tho, they only use the generated code: long compilation time is no problem if you have good modular compilation. http://www.fftw.org/ http://www.fftw.org/ http://flopoco.gforge.inria.fr/ http://flopoco.gforge.inria.fr/ https://github.com/FStarLang/kremlin https://github.com/FStarLang/kremlin https://github.com/project-everest/vale https://github.com/project-everest/vale
- aflag 6y agoLong compilation time can hurt developer productivity as they need to wait longer to test the code they just wrote. It doesn't slow the developer as much as having to write the code themselves, but it's still slower than paying the cost at the execution time (in many cases, anyway).
- blandflakes 6y agoI generally am very willing to trade compile-time speed for safety or runtime speed. One case I can think of where I wouldn't though is experimentation, where I need to experiment with a built artifact. For example, sometimes I want to run code in a dev environment to test it without building and running an entire microservice graph, and there I feel Scala's slow compiletime rather acutely (even when skipping other steps like checkstyele, unit tests, and integration tests).
- overgard 6y agoQuick iteration times make debugging and experimenting much easier. I spend much more time debugging and experimenting then I do optimizing or making high level designs.
- pif 6y agoEver heard about -O0 and -O3 ??