Originally posted by birdie
View Post
Announcement
Collapse
No announcement yet.
GCC Benchmarks At Varying Optimization Levels With Core i9 10900K Show An Unexpected Surprise
Collapse
X
-
Originally posted by Michael View Post
Because many distributions and others just do "-O2" without "-march=native" which is why that level was tested that way.
Originally posted by sdack View PostYou're missing the point. The problem is that it showswith gcc 10, but it doesn't show with gcc 8 and 9. This is very likely a compiler regression.
Edit: I've gone ahead and filed a bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337Last edited by birdie; 27 July 2020, 11:33 AM.
- Likes 8
Comment
-
Originally posted by birdie View PostSo, -O2 was run without -march=native, while -O3 used the option.
Sorry, Michael , it's hard to take your results seriously. Please retest while giving all the optimization levels comparable compilation flags.
Without -march=native GCC optimizes the code for the generic oldest x86-64 CPU which is Athlon 64 from over 15 years ago. Quite expectedly the extended instruction set is not being used.
Edit: beaten to the punch.
- Likes 5
Comment
-
well, I said for a while GCC is mostly compiling slower, not producing significantly different or slower binaries, also on other architectures like PowerPC and MIPS: https://www.youtube.com/watch?v=0iN-ynOvxUQ
- Likes 2
Comment
-
-
Originally posted by birdie View PostOr it might be possible that they found non-compliant x86-64 options which prevented the code from running on the oldest x86-64 CPUs and removed it.
- Likes 2
Comment
-
They reworked inliner thresholds for O2 in gcc 10 and now O2 sucks
they failed to fix compile time regressions by using better code / algoritms so they used a big hammer and destroyed inliner for O2 :/ And almost all linux software is compiled with O2 - ouch!
Michael, any results for branched clang 11 ? Your benchmarks helped a lot and some regressions were fixed before clang 10 final release thanks to your results.
- Likes 5
Comment
Comment