AMD Ryzen 9 5950X + GCC 11 Compiler Benchmarks At Varying Optimization Levels
These results should hardly come as a surprise to most readers... -O3 -march=znver3 -flto tends to yield the fastest performance in a majority of the tests as one would expect. In some tests, -Ofast was actually hurting the performance.
While in other cases like MrBayes, making use of the potentially unsafe -Ofast level was of measurable help... But at this level is not strict standards compliance.
As shown in last month's article and outlined in various news articles, at the moment there isn't much of a difference between the Znver2 and Znver3 targets unless a particular workload is making use of the newly supported instructions.