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

To elaborate on its usefullness: An XOR-swap is only useful when you do not have space for a new pointer, otherwise, making a new temporary variable will on most processors be faster than XOR-swapping.



I would assume you need to be using regesters for three XOR's to be slower than a temperary variable.




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

Search: