logoalt Hacker News

userbinatortoday at 4:27 AM1 replyview on HN

Everyone knows that the != operator is a surplus of the C language, use only the minus operator.

It's notable that on most CPUs, the comparison instruction is equivalent to a subtraction but without writing the actual result.


Replies

badc0ffeetoday at 8:00 AM

Wouldn't XOR or something be much quicker than all the steps involved in subtraction?

show 1 reply