4 ms·
Wow, I find "vast vast vast" hard to believe. If we don't have loops where a lot of CPU time is spent, why even write in C++? I admittedly focus more on librar
by janwas 3y ago
Wow, I find "vast vast vast" hard to believe.
If we don't have loops where a lot of CPU time is spent, why even write in C++?
I admittedly focus more on libraries, but quite a large number of them are already vectorized. I would venture that a sizable fraction of CPU time, even in 'normal' non-HPC context, uses SIMD indirectly. Think image/video decompression, browser handshakes/rendering, image editing, etc.
- IshKebab 3y ago> If we don't have loops where a lot of CPU time is spent, why even write in C++? Because it isn't just hot or autovectorisable loops that are faster in C++; everything is faster. Function calls, member accesses, arithmetic, etc. Even loops are normally not very hot and not autovectorisable. You're right that things like audio/image processing, compression etc. benefits from SIMD but that is in the 1%. Those are libraries that have already been written. The vast vast majority of people are not writing audio codecs or whatever.
- kolbe 3y ago> Those are libraries that have already been written. Written using SIMD. > The vast vast majority of people are not writing audio codecs or whatever. Or HPC, or finance, or json parsing, or PDE solving, or gaming.... All off these (and more) benefit from AVX512. Why are you going so far out of your way to be dismissive of this?