4 ms·
The article is really targeting popcount for large bitvectors; in this scenario, call overhead is a non-issue (constant cost of <5-10 cycles vs O(n) work to be
by stephencanon 11y ago
The article is really targeting popcount for large bitvectors; in this scenario, call overhead is a non-issue (constant cost of <5-10 cycles vs O(n) work to be performed). I$ effects will also be negligible (the AVX2 instruction sequence is only a few cachelines long, and you wouldn't inline it).
- wmu 11y agoI did some tests and it seems that the AVX2 code is faster than popcnt when the input size is 512 bytes or more.