Re: qsort() documentation

From: Aleksander Alekseev <afiskon_at_devzen.ru>
Date: Mon, 18 Apr 2016 15:16:39 +0300
Hello.

I suggest also add a short description of how it was achieved
(randomization?).

On Mon, 18 Apr 2016 13:43:38 +0200
Hans Petter Selasky <hps_at_selasky.org> wrote:

> Hi,
> 
> Are there any objections adding the following as part of documenting
> our kernel's qsort function?
> 
> Index: sys/libkern/qsort.c
> ===================================================================
> --- sys/libkern/qsort.c (revision 298202)
> +++ sys/libkern/qsort.c (working copy)
> _at__at_ -45,6 +45,10 _at__at_
> 
>   /*
>    * Qsort routine from Bentley & McIlroy's "Engineering a Sort
> Function".
> + *
> + * NOTE: This implementation of qsort() was designed to not have the
> + * worst case complexity of N**2, as seen with the regular quick sort
> + * functions as described by Wikipedia.
>    */
> 
> 
> --HPS
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe_at_freebsd.org"
> 



-- 
Best regards,
Aleksander Alekseev
http://eax.me/
Received on Mon Apr 18 2016 - 10:17:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:04 UTC