3 ms·
I used to do a lot of bit twiddling (for compression) and the fact that shift values of 64 (for 64-bit integers) always have to be special-cased, instead of jus
by ot 3y ago
I used to do a lot of bit twiddling (for compression) and the fact that shift values of 64 (for 64-bit integers) always have to be special-cased, instead of just zeroing out the value, is so annoying and inefficient. I really wish it just worked in hardware.
- IshKebab 3y agoI totally agree. I can understand why they don't allow it but it definitely makes code more awkward.
- thrtythreeforty 3y agoIt would be about 64 gates. Sort of irritating that it doesn't work, to be honest.
- jleahy 3y agoWell it does work in hardware, but not with the normal shift instruction. Just use a ‘double shift’ which you can get with __int128 (or with inline asm, or just full asm).