GCC Benchmarks At Varying Optimization Levels With Core i9 10900K Show An Unexpected Surprise
The AOM-AV1 video encoder performance also was hit sharply on GCC 10 with -O2. Most of the time I am running compiler tests is focused on -O3 or -O3 -march=native, which may explain why previous tests didn't show such degraded performance.
The x265 performance was also quite bad with GCC 10's -O2 optimization level.
The main takeaway from this round of testing was that for many -- but not all tests -- the "-O2" optimization level led to severely degraded performance at least for this Core i9 10900K system.
The "-O3 -march=native" and "-O3 -march=native -flto" performance wasn't all that interesting in this testing, but the main takeaway is that "-O2" is much slower on the latest GCC 10 code. As for why, I haven't seen any explanation yet but will be firing off more benchmarks to see if it's isolated to this system/microarchitecture or something else going awry.
If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.