lkml.org 
[lkml]   [2004]   [Jan]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Add noinline attribute
FromPeter Osterlund <>
Date16 Jan 2004 01:26:10 +0100
Linus Torvalds <torvalds@osdl.org> writes:

> On Wed, 15 Jan 2004, Andi Kleen wrote:
> > 
> > That's fine for me. In fact I did this some time ago on x86-64 when I 
> > ran into similar problems. Here's a port of the x86-64 sort function.
> 
> Ugh. Can't we just make this be generic code (and that means calling it in
> the module loading code too..)?
> 
> As to bubble sort (which is fine for something that is 99% sorted anyway),
> isn't it better to continue pushing the entry down when you find something 
> out of order? That way you don't have to repeat the whole scan, you just 
> continue with the next entry once the unsorted entry has percolated to its 
> place (ie keep entries "0..n-1" sorted at all times). That should make the 
> code cleaner too.

Yes, that algorithm is called insertion sort and is already
implemented in the ppc arch.

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:00    [from the cache]
©2003-2008