Hacker News new | ask | show | jobs
by masklinn 60 days ago
The question is why one idiom won over the other, which happened a long time ago.

Because as the article notes on "any modern x86 processor" both xor r, r and sub r, r are handled by the frontend and have essentially no cost.

1 comments

Because of encoding size of the machine code, not because of any runtime cost
> It encodes to the same number of bytes