I've tried. O3 is faster. But not by much. Perhaps I should spill the guts out of O3 - O2, and try each optimisation in that set one by one, to see which one is useful. It could be a mixed bag of good and bad ones.
GCC 8.1 vs GCC 10.1
Moderators: hgm, Rebel, chrisw
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: GCC 8.1 vs GCC 10.1
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: GCC 8.1 vs GCC 10.1
For Cfish on my old i3930k (Sandybridge) and using gcc-7.x, I arrived at:
Code: Select all
-O3 -fira-loop-pressure -fconserve-stack -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure -flimit-function-alignment -fno-tree-pre
For some reason LTO does not help for Cfish at all, at least not on Intel. I suspect mainly because there is not to much to optimise anymore between compilation units. The LTO build is about 10k smaller and I would like to know why (because that should help explain why the LTO build is slower), but there doesn't seem to be a way to get the assemly output for the LTO binary. (I could use a disassembler but I won't.)