Originally posted by cl333r
View Post
Announcement
Collapse
No announcement yet.
GCC 12 Enables Auto-Vectorization For -O2 Optimization Level
Collapse
X
-
Originally posted by birdie View PostThis option makes the binary code significantly fatter while not always making it faster. I used it many years ago, then actually tested a number of applications, found no significant improvements in most of them and disabled it for good.
- Likes 4
Comment
-
Originally posted by cl333r View Post
I was wondering what applications would see a noticeable improvement?
For instance autovectorization helps Qt a lot when working on non-standard formats, working on RGB32 or ARGB32PM is hand vectorized, but if you work on RGB555 or ARGB4444PM you benefit greatly from autovectorization. But even here, this won't make a difference, since for this exact reason the graphics module in Qt is already compiled with -O3 by default.
- Likes 1
Comment
-
Originally posted by jonix View PostIf I remember correctly arch uses -O2 by default on their packages.
Code:CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
Comment
-
-
Originally posted by pal666 View Postno, you started with -fno-math-errno, which builds some other language than standard c or c++
And of course the features only accessible from other languages should probably be disabled with compiling c/c++, though it may require a new major version with a big changelog warning, as gcc is also used to compile libraries for other languages.
- Likes 1
Comment
Comment