3 ms·
You could make the argument that: - a slower build time should not be made at the expense of a more extensible compiler - one that can be modified easily to ad
by m463 7y ago
You could make the argument that:
- a slower build time should not be made at the expense of a more extensible compiler - one that can be modified easily to add capabilities and features to the build output
- a slower build time is acceptable if the build result executes faster or more efficiently. One slower compile vs one million faster executions is keeping your eye on the prize.
- rubber_duck 7y agoThis all depends on build scenario/configuration. -O3 - take all the time you need, -O2 and below - please don't regress the performance of the compiler - as article states - we are happy enough with the level of output we currently get.
- eru 7y agoYes, exactly, it's a question of what you ask from the compiler. Not sure whether the -O2 and -O3 system is the exact right choice to communicate that. But any better system would also preserve the user's ability to make this trade-off. Though I don't think there's necessarily anything magic about -O2. They could conceivably also only protect -O0 and perhaps -O1. Or give finer grained control over the trade-offs.
- rubber_duck 7y ago-O2 is often the only usable output level in some scenarios even during development so it's important to keep it usable in development iterations, -O3 is "I don't care about compile time"
- streb-lo 7y agoThe argument is simple IMO: * release target build times aren't an issue. They can be done overnight and aren't part of the work cycle. * un-optimized build times are part of the work cycle and should be as speedy as possible.
- gpm 7y ago> * release target build times aren't an issue. They can be done overnight and aren't part of the work cycle. Emphasis added. This isn't true for many use cases. There are times when release build + single run is faster than debug build because run time is relatively long (e.g. scientific sims with small code bases + big loops). There are times when debug builds simply aren't sufficient (e.g. when optimizing code).
- streb-lo 7y agoOK that's true but I think my point still stands. Someone who is doing very heavy scientific computation with long-run times will still prefer a release build that is optimizing for run-time speedup over compile-time speedup, within reason of course.
- gpm 7y agoI agree the point still largely stands, that's why I added the emphasis. Maybe I should have made the intent of that clearer.
- kalleboo 7y agoI was going to counter that doesn't WebKit use LLVM to compile hot JavaScript code paths, but it turns out that they have already replaced it with a bespoke optimizer with faster compilation times. https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/ https://webkit.org/blog/5852/introducing-the-b3-jit-compiler...