4 ms·
>> Using SIMD for small vector math is at best a wash, and typically a poor idea for performance. I just want to have a vector X = [1,2,3,4] and Y = [5,6,7,8]
by phkahler 11y ago
>> Using SIMD for small vector math is at best a wash, and typically a poor idea for performance.
I just want to have a vector X = [1,2,3,4] and Y = [5,6,7,8] and be able to write A = X+Y. Or for a constant k, write A += k*X. These are extremely fast when using vector operations on intrinsics (one instruction). 2,3, and 4-element vectors are so common, it makes perfect sense to support them directly in a language.