3 ms·
Decades ago, I discovered a compiler for an obscure microprocessor was generating a subtraction operation to test if two integers are equal. I then turned the o
by billpg 2y ago
Decades ago, I discovered a compiler for an obscure microprocessor was generating a subtraction operation to test if two integers are equal. I then turned the optimisations on and it generated an XOR instruction instead.
I suspect a lot of these hacks are used by an optimising compiler.