Skip to main content

Optimized-out benchmarks

CodSpeed reports that a benchmark measured no execution time when it detects no execution of the code under test. The compiler likely removed that code, since nothing in the benchmark uses its result. Keep the compiler from optimizing the benchmark away, then run it again:

Rust

C++