Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
JeanPierre
on July 22, 2011
|
parent
|
context
|
favorite
| on:
Wikipedia: Making of Doom
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.
onemoreact
on July 22, 2011
[–]
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: