mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Improved Swaping Method In sort.c
@ 2008-04-30 18:09 Soumyadip Das Mahapatra
  2008-04-30 18:17 ` Andi Kleen
  2008-04-30 18:19 ` Ray Lee
  0 siblings, 2 replies; 3+ messages in thread
From: Soumyadip Das Mahapatra @ 2008-04-30 18:09 UTC (permalink / raw)
  To: linux-kernel

Thanks Jan,
Actually it should be
static void u32_swap(void *a, void *b)
{
    *(u32 *)b ^= *(u32 *)a;
    *(u32 *)a ^= *(u32 *)b;
    *(u32 *)b ^= *(u32 *)a;
}
But this code saves memory equaling two integers. What about that ?




      Meet people who discuss and share your passions. Go to http://in.promos.yahoo.com/groups/bestofyahoo/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-30 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-30 18:09 Improved Swaping Method In sort.c Soumyadip Das Mahapatra
2008-04-30 18:17 ` Andi Kleen
2008-04-30 18:19 ` Ray Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®