3 ms·
> since that one is operating on only 32 bits at a time. https://doc.rust-lang.org/std/primitive.u64.html#method.count_ones https://doc.rust-lang.org/std/primi
by the8472 9y ago
> since that one is operating on only 32 bits at a time.
https://doc.rust-lang.org/std/primitive.u64.html#method.count_ones https://doc.rust-lang.org/std/primitive.u64.html#method.coun...
https://doc.rust-lang.org/std/primitive.u128.html#method.count_ones https://doc.rust-lang.org/std/primitive.u128.html#method.cou...
Of course to benefit from the SSE optimizations you would still have to call it in a loop and the optimizer would have to recognize that and replace it with a vectorized approach.
- jackmott 9y agoyou can do the simd intrinsics explicitly as well