Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2022 16:19:25 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Robert Clausecker <fuz@fuz.su>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: [RFC] Proposal adding new sorting algorithm, bsort() to libc
Message-ID:  <1e609631-37e2-3818-37e3-72773758ff40@selasky.org>
In-Reply-To: <YxnziKoQzkSDlgts@fuz.su>
References:  <c7df2462-e0b7-f98c-d45d-ed1c185a2e07@selasky.org> <YxnziKoQzkSDlgts@fuz.su>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/8/22 15:52, Robert Clausecker wrote:
>> See:
>> https://reviews.freebsd.org/D36493
> 
> Looks interesting!  Any particular reason you add a new function to the
> libc instead of just replacing qsort(3) with the new algorithm?
> 
> Yours,
> Robert Clausecker
> 

Hi,

It's a good question. My plan was first to establish the concept about 
bsort() and then at some point remove qsort() and make those qsort() 
functions symbol aliases for bsort().

There are several write-ups about "trying to fix qsort()". Here is a 
link for one of them:

https://www.raygard.net/2022/02/27/Re-engineering-a-qsort-part-4/

The question is, if there is a fix for qsort() in FreeBSD, will there be 
a fix in other operating systems too? That's one argument for giving 
bitonic sort an own name.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1e609631-37e2-3818-37e3-72773758ff40>