As TFA says, on x86 `sub eax, eax` encodes to the same number of bytes and executes in the same number of cycles.
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.
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.