LLVM Clang 12 Benchmarks At Varying Optimization Levels, LTO

Written by Michael Larabel in Software on 25 June 2021 at 12:00 PM EDT. Page 2 of 3. 18 Comments.
LLVM Clang Optimization Levels On Intel Rocket Lake
LLVM Clang Optimization Levels On Intel Rocket Lake

As we are used to seeing, hitting at least the -O2 optimization level allows for a bulk of the compiler performance optimizations. But in cases like Crypto++, making use of "-march=native" is of measurable benefit. The link-time optimizations here were also of some minor help.

LLVM Clang Optimization Levels On Intel Rocket Lake
LLVM Clang Optimization Levels On Intel Rocket Lake
LLVM Clang Optimization Levels On Intel Rocket Lake

The Botan crypto benchmarks meanwhile failed to build with the Clang LTO option but was enjoying nice benefits from "-march=native" targeting.

LLVM Clang Optimization Levels On Intel Rocket Lake
LLVM Clang Optimization Levels On Intel Rocket Lake

MrBayes and HMMer are two of the tests having a measurable boost with -Ofast compared to -O3, but with the caveat that using -Ofast can lead to potentially unsafe math.


Related Articles