XOR swap algorithm - Princeton University - Home
1 The algorithm 2 Proof that the XOR swap works 3 Code example 4 Reasons for use in practice 5 Reasons for avoidance in practice 5.1 The XCHG instruction 5.2 Aliasing 6 Variations 7 Notes 8 See also The algorithm Conventional swapping requires the use of
www.princeton.edu |