
Terrible interview question: Swap variables without a temporary - ingve
https://mortoray.com/2019/04/25/terrible-interview-question-swap-variables-without-a-temporary/
======
billconan
Ha, I got asked this question during an interview many years ago. I knew the
answer, but then the interviewer asked me why do they use this code (swap
variables without a temp) in real code. (I was interviewing with device driver
team) . I couldn't answer this one.

the reason is that if we only use operators without memory operations, the cpu
pipeline can finish sooner, because the alu comes first in the pipeline. So it
will be faster.

