News for hackers. Stuff that matters.
Re:Improving on std:count_if()'s auto-vectorization by TinkersW on Sunday March 09, 2025 @05:47PM (#43314241)
The accumulator is a vector type, with 64 bit sum you can only fit 4 into a 256 bit register.

After the loop it will do a horizontal add across the vector register to produce the final scalar result.

There are no comments on this comment yet.