3 ms·
Between BMI instructions (PEXT, PDEP, bit reverse, least significant 1s bit, etc. Etc), AES, SHA1, add, xor, rotate, shift, and, or, not, multiply, carryless mu
by dragontamer 3y ago
Between BMI instructions (PEXT, PDEP, bit reverse, least significant 1s bit, etc. Etc), AES, SHA1, add, xor, rotate, shift, and, or, not, multiply, carryless multiply and...
Pshufb (4-bit / 16-byte lookup table)
You might be surprised at how many operations can be done without touching the load/store units on CPUs.
In my experience, it's usually worth the effort. Then again, it's a LOT of effort needed.
If you are just doing things simply and easily? Lookups are almost the easiest solution. But I probably wouldn't reach for lookup tables for a performance based problem today.