3 ms·
I think optimizations passes is what takes the most time in a compiler. Older compilers did a lot less.
by pkaye 6y ago
I think optimizations passes is what takes the most time in a compiler. Older compilers did a lot less.
- andi999 6y agoWell then at leastbwith -O0 should be similiar times achievable?
- TazeTSchnitzel 6y agoModern compilers are still pass-based with an optimisation-friendly IR even if you skip the actual optimisation passes. A single-pass compiler will be faster because it does not have the overhead of doing things in multiple passes.
- Touche 6y agoTurbo pascal was single pass, parse and compile.
- pkaye 6y ago-O0 still does some optimization from what I can find online. Maybe someone knows more specifics since the manual is pretty brief.
- guenthert 6y agoI can only confirm that -O0 performs some optimization, which can be annoying when single-stepping through the code (cough, cough) using a debugger. Hence gcc offers -Og to suppress those optimizations (not sure, whether that in itself causes some debugging info to be added though).