Remix.run Logo
userbinator 5 hours ago

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.

badc0ffee an hour ago | parent [-]

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

Sharlin 43 minutes ago | parent [-]

They’ve both had the exact same cost (both throughput and latency) on just about any ALU designed in the last several decades. There are no separate steps involved in the function of a full adder.