Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Shouldn't people expect compile times to be slower at -O3? Presumably the improvements are better optimizations, many of which trade compile time for execution time. Now if it's getting slower at -O0, that might be a concern.


There are dynamic interpreted languages that use LLVM as a way to compile fast paths (the details are more complicated). For such languages how fast the heavily-optimized code is compiled matters. Julia is a great example.

In this particular case though, no it does not seem it matters, as the slowdown is related to C++ headers in the newer standard lib, not to the low-level compilation.


Is Julia using -O3? I would find that surprising as it is not recommended. -O3 could be a good starting point, but with maturity a frontend should be evaluating individual passes.

"One of the most common mistakes made by new language frontend projects is to use the existing -O2 or -O3 pass pipelines as is. These pass pipelines make a good starting point for an optimizing compiler for any language, but they have been carefully tuned for C and C++, not your target language. You will almost certainly need to use a custom pass order to achieve optimal performance."

https://www.llvm.org/docs/Frontend/PerformanceTips.html


You are right, Julia is indeed customizing how exactly the compilation happens (with a ton of higher-level compiler customization happening in Julia).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: