This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An improved merge-sort algorithm


On Sun, Dec 09, 2007 at 05:13:36PM -0800, Wayne Davison wrote:
> Since the algorithm is a little more complex than the old one, I decided
> to use a macro as a function template.  I also created a separate static
> function for each of the separate copy-size cases instead of using a
> switch inside a single function.  A small number of inline copy-one-item
> functions makes the template easy for all the types.

I'm not convinced that's a good idea (separate routines for each size).
Have you checked the resulting code size of msort.os compared to unpatched
msort.os?  It is already big as is, and the bigger it is the worse will
be I$ behavior of it. Many apps use various sized qsorts close to each other...

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]