SPEC says Intel's compiler used unfair optimizations to boost performance
tomshardware.com
tomshardware.com
"We conclude this paper by citing cases [of] compiler optimizations specifically designed for SPEC programs, in which performance decreases drastically or the computed results are incorrect if the compiled program does not exactly match the SPEC benchmark program. These findings show that the fairness and value of the popular SPEC benchmarks are questionable."[1]
"Issue: Special library for a specific benchmark... Issue: Pattern matching for the inner loop of a specific benchmark... Issue: Compilers optimize too much for the SPEC CPU benchmarks... Issue: The compiler optimization parameters (flags) used are unrealistic..."[2]
See also: Goodhart's Law[3].
[1] N. Mirghafori, M. Jacoby, D. Patterson, "Truth in SPEC benchmarks", ACM SIGARCH Computer Architecture News, 1995
[2] R. Weicker, "SPEC OSG Benchmarks: History, Use and Current Issues", in "Performance Evaluation and Benchmarking with Realistic Applications", R. Eigenmann (Ed.), 2001
Does this mean that if I use their compiler in production I might get worse performance because they apply this optimization to my own code as well?
For your code to benefit, it would have to do the same things the benchmark is computing and have the same shape of data as the data included with the benchmark suite.
According to Phoronix, the optimization could boost performance in SPECint by 9% overall. The publication also notes that versions 2022.0 to 2023.0 of the Intel oneAPI Compiler are impacted, meaning most of the now-invalidated results were run in 2022, largely on Sapphire Rapids CPUs.
9% bump for free.