Re: A question sort_main_extable()

From: Andi Kleen
Date: Sun Nov 23 2008 - 14:46:08 EST


Arjan van de Ven <arjan@xxxxxxxxxxxxx> writes:
>
> we used to do this but it was a pain and extremely fragile. Runtime
> sorting makes it very robust at least.

It's not only extremly fragile, but just broken with out of line
section which gcc also generates these days.

>
> The sort is really quick though; I've spent a lot of time on boot time
> and this guy never showed up for me.

If you really wanted to speed it up you could actually just switch
over to a bubble sort. It's typically the best algorithm for nearly
already sorted input data, which this is.

But then as you say it's not worth it.

-Andi

--
ak@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/