News for hackers. Stuff that matters.
Re:Clang's -O0 output: branch displacement and size increase by o11c on Friday April 26, 2024 @11:30PM (#40176903)
Despite the fact that you say "all the major compilers", GCC and Clang make very different decisions for each optimization level.

In particular, GCC generates fairly debuggable code at all optimization levels, so there is less motivation for -O0 in the first place.

Re:Clang's -O0 output: branch displacement and size increase by MaskRay on Sunday April 28, 2024 @12:48PM (#40189877)
There is ongoing work to improve debuggability for optimized code. https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-ne...

``` Mode | Execution Time | Debuggability | Compile Time O0 | 1.0000 | 1.0000 | 1.0000 Og | 0.3439 | 0.5357 | 1.8630 O1 | 0.3082 | 0.4241 | 1.7880 O2g | 0.2823 | 0.4845 | 3.0420 O2 | 0.2514 | 0.3908 | 2.9380 ```