3 ms·
I don't understand one things: the original scalar version sums bytes, while the SIMD version sums 32-bit values and returns the sum mod 256. The SIMD version m
by wmu 9y ago
I don't understand one things: the original scalar version sums bytes, while the SIMD version sums 32-bit values and returns the sum mod 256. The SIMD version might be much simpler if just byte-wide operations were used. Did I miss something important?
- booblik 9y agoYou didn’t miss anything. This code is total crap. It should use paddb, instead of unpacking into dwords. Also the link is from 2014, so AVX2 could do that twice as fast. Bottom line: code could be at least 8 times faster. Kids, don’t learn from this.