News for hackers. Stuff that matters.
Re:How many reversible integer operations do you know? by jws on Sunday January 14, 2018 @11:27AM (#16144875)
Not explicit in the title is “efficiently on a modern CPU”. They tend to be 1 to 4 opcodes each. I think the list might serve as a jumping off point if you are looking at an algorithm which depends on an integer permutation and want to consider how it would change if you used a different permutation.

And missing from the list—the identity function! Very fast to compute and universally (not)implemented on all CPUs.

Re:How many reversible integer operations do you know? by haimez on Sunday January 14, 2018 @05:49PM (#16146989)
The identity function is not an interesting opcode because there's already the NOOP code and because compilers are expected to be able to identify the identity transform with great accuracy.