Hacker News new | past | comments | ask | show | jobs | submit login

The XOR trick has also the disadvantage of being 3 dependend instructions that can not overlap. The one with a temp variable has only 2 of them dependend and can therefore save one cycle on an OO CPU.



Even in a old OOO core because of register renaming and friends the swap could have a latency of zero in the first place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: