Re: [PATCH] lib: add statsort(), a distribution/bucket sort

From: Andrew Morton

Date: Tue Aug 04 2026 - 20:36:03 EST


On Tue, 4 Aug 2026 17:15:36 -0700 Peter <peter.schuster.taraba@xxxxxxxxx> wrote:

> because it's much faster than current alternatives and linux kernel will
> need it in future. don't forget the unknown is much larger than known.
>
> FYI - this alg is even faster than C++ Boost library:
> https://github.com/drpt78stu2/fspclib

OK, thanks.

Some measurements which help us understand the performance difference
would be useful.

I'm not aware of any kernel code which spends significant time sorting
things(?), so the motivation here won't be high.

The existing sort() has a little self-test in lib/tests/test_sort.c.