4 ms·
You need "-C opt-level=3 -C target-cpu=native -C target-feature=+ssse3" I actually wrote about it last week: http://tmccrmck.github.io//post/rust-optimization-
by tmccrmck 9y ago
You need "-C opt-level=3 -C target-cpu=native -C target-feature=+ssse3"
I actually wrote about it last week: http://tmccrmck.github.io//post/rust-optimization-partii/ http://tmccrmck.github.io//post/rust-optimization-partii/
- krallja 9y agoThere's a little typo in your C implementation of popcount: you reference `x` when you probably meant `n`
- tmccrmck 9y agoThanks. I fixed it.
- burntsushi 9y agoYou can drop `-C target-feature=+ssse3` since `target-cpu=native` will cover that. The `-C opt-level=3` isn't necessary either, but if you drop that, it looks like there's a function that doesn't get inlined. However, even without opt-level=3, the popcnt instruction is still emitted.