3 ms·
LLVM is not a particularly slow compiler (though it is progressively getting slower). There are faster compilers out there, but it’s fine. The reason julia has
by eigenspace 4y ago
LLVM is not a particularly slow compiler (though it is progressively getting slower). There are faster compilers out there, but it’s fine.
The reason julia has so much compiler latency is not that we have a slow compiler, it’s that we compile a LOT of code.
Julia is very very (runtime) performance oriented, and so we do everything we can to speed up execution time. This means that we have very aggressive code specialization, inlining, and unrolling heuristics, and people take heavy advantage of them. It’s a very normal thing in julia to try and write very high level generic code that performs like low level optimized code by taking advantage of versions code generation techniques.
In addition to all of that, we end up recompiling a lot of code that was already compiled before because we have very strict heuristics to make sure that when a method body is altered, all downstream dependants of that method get invalidated and must be recompiled, and sometimes the heuristics overeager.
Julia compile times have been dropping rapidly over the past couple years mostly because people have put a lot of work into avoiding invalidations, and being smarter about how compile-time code generation is approached. Almost none of that improvement has to do with LLVM, it all happens well before we hand things off to LLVM.