Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, just because you see SIMD instructions doesn't mean the code is fast. You need the correct instructions.

Not relevant to this example, which is `popcount`ing only a single number, but AVX512 did also introduce SIMD popcount instructions for getting many inputs at a time. Also true for other useful bit-funs like leading or trailing zeros. So if you're using zmm registers, you can do way better than that godbolt example.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: