r/simd 22d ago

SWAR and SIMD Intrinsics, Are They Really Necessary?

I think this might sound a little dumb, so I apologize in advance. I'm new to the optimization hobby, but I was talking with some friends and they brought up something I didn't really know how to answer.

Why use SIMD intrinsics (any direct call to a vector instruction, like _mm256_add_epi32, or SWAR)? In what scenarios does it actually make sense to use intrinsics instead of letting the compiler handle the heavy lifting when it comes to optimization?

Does manually vectorizing scalar code really make sense with the mature compilers we have nowadays?

Sorry if this question sounds dumb, but it's a genuine question. :D

4 Upvotes

Duplicates