4 ms·
Probably. To vectorize effectively for wide SIMD architectures, you need to start with the right data-layout properties (struct of arrays, instead of array of s
by jcranmer 7y ago
Probably. To vectorize effectively for wide SIMD architectures, you need to start with the right data-layout properties (struct of arrays, instead of array of structs), as well as vectorizing at the right level. The standard way people write code in C/C++ is simply not that great for doing this stuff automatically.
The difference is going to be a lot more minor if you use C/C++ code written with #pragma vectorize manually, and do these data transforms yourself in code. I know Intel has been pushing harder on "outer-loop vectorization," judging from the papers they've been putting out at PLDI and the like. But I still imagine that a dedicated SPMD programming language is going to have an edge over twisting C/C++ to that end, especially in terms of ergonomics, if nothing else.