GCC 11 Compiler Performance Benchmarks With Various Optimization Levels, LTO

Given the most modern forum dialogue stemming from the -O3 optimization level restful too unsafe for the Linux kernel (in half due to the older, buggy compilers) and some users questioning about the most modern -O2 versus -O3 compiler optimization level affect, right here’s a unique round of reference benchmarks the use of GCC 11.1 on Fedora Workstation 33 having a behold at a good deal of optimization ranges and optimizations examined on dozens of diverse utility benchmarks to seek info from the overall affect on performance.

With the most modern optimization level discussions and not having completed any thorough optimization level comparison assessments and link-time optimization (LTO) checking out of the in an instant launched GCC 11, right here is this Monday article for these drawn to compiler optimizations.

The combo of CFLAGS/CXXFLAGS examined included:

-O0

-Og

-O1

-O2

-O2 -flto

-O2 -march=native

-O3

-O3 -flto

-O3 -march=native

-O3 -march=native -flto

-Ofast

-Ofast -march=native

These dozen diverse CFLAGS/CXXFLAGS combos were examined across 43 benchmarks having a behold at the performance on the ensuing code every time.

This round of checking out used to be implemented the use of an Intel Core i9 11900K “Rocket Lake” contrivance with Fedora Workstation 33.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x