3 ms·
- When AVX/AVX2 was introduced on Haswell, you could have slowdown because algorithm using both lanes had to use additional permutes. - The AVX throttling slow
by p0nce 4y ago
- When AVX/AVX2 was introduced on Haswell, you could have slowdown because algorithm using both lanes had to use additional permutes.
- The AVX throttling slowdown
AVX is just risky
- janwas 4y agoTo clarify, are you saying the entire app was slower with AVX than it was with SSE4? That would be surprising, because 2x vector width is expected to outweigh 10-20 percent downclocking. Even more so with Haswell, which adds FMA and thus doubles FLOPS. The additional permutes are indeed not free, but we did get an all to all int32 shuffle, which could actually be more efficient than having to load/generate the corresponding PSHUFB input. Taking a step back, these are examples of AVX adding a bit of cost, but I'm not yet seeing an accounting of the benefits, nor showing that they are outweighed by the cost.
- p0nce 4y ago> To clarify, are you saying the entire app was slower with AVX than it was with SSE4? We were optimizing loop by loop, and some loops converted in AVX could well be slower yes (at this point of time). AVX is probably more often a win nowadays. > That would be surprising, because 2x vector width is expected to outweigh 10-20 percent downclocking. In practice workload is often bottleneck by memory access, and there is diminishing returns with increased vector size.