[ad_1] Matt Godbolt, probably best known for being the proprietor of Compiler Explorer, wrote a brief article on why x86 compilers love the xor eax, eax instruction. The answer is that it is the most compact way to set a register to zero on x86. In particular, it is several bytes shorter than the more …
Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?
