3 ms·
http://stackoverflow.com/questions/1135679/does-using-xor-reg-reg-give-advantage-over-mov-reg-0 http://stackoverflow.com/questions/1135679/does-using-xor-re...
by Someone 15y ago
http://stackoverflow.com/questions/1135679/does-using-xor-reg-reg-give-advantage-over-mov-reg-0 http://stackoverflow.com/questions/1135679/does-using-xor-re... gives more answers than you want, especiallly if you read that Intel PDF.
It is not 100% a "smaller is better" choice. You also will want to check whether an instruction depends on an earlier one (for example, the XOR technically needs to read the register; if the CPU does not know that that is not actually the case, a self-XOR may introduce pipeline bubbles), what instruction unit (if any) it uses, and whether you want to preserve flags.