Three dominantthemes in the discussion
| # | Theme | Supporting quotation(s) |
|---|---|---|
| 1 | Historical size & encoding constraints made XOR the natural “zero‑register” idiom | “The XOR A,A trick goes at least back to the IBM System/360 back in 1964” – HarHarVeryFunny |
| 2 | XOR and SUB have identical timing on modern x86; the speed advantage is a myth | “sub eax, eax encodes to the same number of bytes and executes in the same number of cycles” – mikequinlan |
| 3 | Modern CPUs internally optimise the pattern (zero‑register rename) so XOR becomes essentially free | “The predominance of these idioms … led Intel to add special xor r,r‑detection … rename the destination to an internal zero register, bypassing the execution of the instruction entirely.” – praptak |
All quotations are reproduced verbatim, with double‑quotes and the author name attached.