logoalt Hacker News

mikequinlantoday at 7:50 AM1 replyview on HN

As TFA says, on x86 `sub eax, eax` encodes to the same number of bytes and executes in the same number of cycles.


Replies

whizztertoday at 8:58 AM

On modern ones, x86 has quite a history and the idiom might carry on from an even older machine.

Edit: Looked at comments, seems like x86 and the major 8bit cpu's had the same speed, pondering in this might be a remnant from the 4-bit ALU times.

show 2 replies