by bobbyi · 3y ago · 0 comments
Wait, what? x86 has specialized instructions for all kinds of things but doesn't have absolute value?
https://en.m.wikipedia.org/wiki/X86_Bit_manipulation_instruc...
Popcnt, LZCNT and TZCNT are pretty nifty and all, but probably more obscure than absolute value.
I do think pdep and pext are brilliant and that more people should play with those two BMI2 instructions.
Amdahl's law. You don't gain a lot of benefit by improving something which is already fast.
TZCNT being used for string parsing... Sorry, can't see it at all or how it could be possible lol. Could you give an example?
(31 - LZCNT(x)) is binary 32-bit logarithm and likely has a number of mathematical applications.