3 ms·
Well, I generally think that CPU SIMD is best used for little one-off things that you don't want to bother uploading to the GPU or other accelerators, not large
by pcwalton 5y ago
Well, I generally think that CPU SIMD is best used for little one-off things that you don't want to bother uploading to the GPU or other accelerators, not large-scale batch data processing. Like, if your game logic is running on CPU, then you're probably running the logic for one entity at a time anyway, in which case you probably just don't have enough batch data to make good use of vertical SIMD. So horizontal SIMD is useful there.
This is why Pathfinder uses horizontal SIMD, incidentally: most of the heavy number crunching is in super branchy code (e.g. clipping, or recursive de Casteljau subdivision) where there just isn't enough batch data available to make good use of vertical SIMD. Compute shader is going to be faster for any heavy-duty batch processing that is non-branchy. The game code I've written is similar.
I guess I can imagine things like physics simulations where you could have a lot of batch data processing on CPU, but even then, running that on GPU is attractive…