4 ms·
-march=native + mimalloc (or jemalloc) should be sufficient without causing significant undefined behavior like -O3 or most extra optimization related compiler
by ac130kz 2y ago
-march=native + mimalloc (or jemalloc) should be sufficient without causing significant undefined behavior like -O3 or most extra optimization related compiler arguments.
- eru 2y agoYes, -O3 is seldom an improvement for most C compilers.
- loeg 2y ago-O3 doesn't cause undefined behavior.
- MyOutfitIsVague 2y agoNo, but it can often expose undefined behavior that doesn't stop a program from "working" on lower optimization levels. Which is why I'm in support of always building your own software with -O3.
- vlovich123 2y agoAre you sure about that? I’m not aware of any additional UB exploitation enabled by O3 vs O2 or Os.
- MyOutfitIsVague 2y agoNope, I'm not sure about it. I remember when I was using Gentoo about 10 years ago, this was the common reason given for using -O2 instead of -O3 in your build flags, and I'm just speaking from that memory.
- vlovich123 2y agoYeah there’s lots of cargo culting FUD like that that happens (see other posters in this thread that claim that glibc is a more stable allocator )