The different instructions execute at different speeds. For example, XORing a number with itself produces 0. Well, the XOR operationis faster than the loading operation, so many programmers use it to load a register with zero. For example, the code
movl $0,