![](https://seccdn.libravatar.org/avatar/08136f0bf89d5d1406c9b2e0d33949bc.jpg?s=120&d=mm&r=g)
Hello, On Sun, Aug 07 2022, Cristian Rodríguez wrote:
On Thu, Aug 4, 2022 at 12:40 PM Martin Jambor <mjambor@suse.cz> wrote:
Over the weekend, I have quickly gathered some SPEC CPU benchmarks results comparing the different x86_64 versions:
Huh, Martin ..thanks for taking the time to do this..it was disappointing to the extreme. So is this a case of
first and foremost, please be careful when interpreting benchmark numbers. Even though as benchmarks go, SPEC is one of the better ones, it is still just a collection of 10 integer-crunching and 13 floating point programs. None of them is concurrent, for example, so it cannot detect any speed-ups due to use of CMPXCHG16B in concurrent algorithms. I posted the results here publicly because... well because Dan asked me to but also to point out the big potential gains at -v3, not necessarily to argue against adopting -v2.
a) most code been written "unaware" of vectorization
I am not sure what you mean. If things like simd OpenMP pragmas, then those are not used in SPEC.
b) the compiler is not aggressive enough
I think that many of the -v3 numbers show that vectorization is employed and helps a lot, but unsurprisingly the big differences only kick in when the vectors are bigger.
c) we do not get warnings of this kind of code
No, we don't. But I think that issuing warnings that would be useful and not annoyingly full of false positives would be very difficult if not impossible. There is the -fopt-info output, which in theory programmers can use to make sure the compiler can vectorize their code, but it is not exactly easy to understand without knowing compiler internals. And that is not easy to change either. Martin