r/programming • • Jul 23 '26

Everyone Should Know SIMD

https://mitchellh.com/writing/everyone-should-know-simd
412 Upvotes

82 comments sorted by

View all comments

Show parent comment

1

u/barsoap Jul 24 '26

I'm reasonably sure both of those are compiler intrinsics.

In general you're right, that's a zig limitation that doesn't exist with actual vector instructions. I guess the reason for comptime-known length is avoiding management overhead on SIMD for vectors that are known to be even sizes. Which happens quite a lot.