Is there a Swap faster than using XOR!!!
From: ANaiveProgrammer (myhotline_at_gmail.com)
Date: 11/29/04
- Next message: Chris Torek: "Re: Is there a Swap faster than using XOR!!!"
- Previous message: Merrill & Michele: "Re: Nth request of book recommendations"
- Next in thread: Chris Torek: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Chris Torek: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Martin Ambuhl: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Paul Hsieh: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Christian Bau: "Re: Is there a Swap faster than using XOR!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Nov 2004 16:10:18 -0800
hi all
swapping two variables using xor can be as follows
b = a ^ b
a = b ^ a
b = a ^ b
i've been given an assigment to do a swap faster than above and
without using three variables ( on a linux box over i80x86)? I was
wondering howz that possible? Any help will be highly
appreciated......
regards
waqas
- Next message: Chris Torek: "Re: Is there a Swap faster than using XOR!!!"
- Previous message: Merrill & Michele: "Re: Nth request of book recommendations"
- Next in thread: Chris Torek: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Chris Torek: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Martin Ambuhl: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Paul Hsieh: "Re: Is there a Swap faster than using XOR!!!"
- Reply: Christian Bau: "Re: Is there a Swap faster than using XOR!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|