History log of /netbsd/lib/libc/stdlib/qsort.c (Results 1 – 22 of 22)
Revision Date Author Comments
# 60f6acd5 19-May-2017 christos <christos@NetBSD.org>

The BSD qsort() performs tail recursion elimination on the second
side of the array being partitioned to save on stack space. Greater
savings can be gained by choosing recursion for the smaller side

The BSD qsort() performs tail recursion elimination on the second
side of the array being partitioned to save on stack space. Greater
savings can be gained by choosing recursion for the smaller side
of the partition and eliminating recursion for the larger side.
This also results in a small but measurable performance gain.
(From OpenBSD)

show more ...


# 0aebefa9 26-May-2012 christos <christos@NetBSD.org>

don't trigger diagassert for a null array with 0 elements or 0 elementsize.


# 738786ee 18-May-2011 dsl <dsl@NetBSD.org>

Remove __P()


# 99122f39 01-Jun-2009 yamt <yamt@NetBSD.org>

qsort: remove the "switch to insertion sort" optimization because it
causes catastrophic performance for certain inputs.


# 8a09e860 30-Jan-2009 lukem <lukem@NetBSD.org>

sign-compare fix


# 461a86f9 11-Jan-2009 christos <christos@NetBSD.org>

merge christos-time_t


# c6555ead 16-Nov-2008 ad <ad@NetBSD.org>

Our qsort() is inappropriate for kernel use because it makes recursive
calls. Replace it with a kheapsort() function in kernel. Pointed out
by tron@.


# 1c7eae55 11-Mar-2008 rmind <rmind@NetBSD.org>

Use size_t to avoid overflow when sorting large arrays. While here, ANSIfy.
Obtained from FreeBSD (das@).


# 4e11af46 24-Dec-2005 perry <perry@NetBSD.org>

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# eb7c1594 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# d8962612 20-Sep-1999 lukem <lukem@NetBSD.org>

back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.


# b48252f3 16-Sep-1999 lukem <lukem@NetBSD.org>

* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attemp

* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif

show more ...


# 33edc15a 15-Nov-1998 christos <christos@NetBSD.org>

delint


# c8bafd62 03-Feb-1998 perry <perry@NetBSD.org>

remove obsolete register declarations


# bd906777 13-Jul-1997 christos <christos@NetBSD.org>

Add local.h for local prototypes.
Fix namespace issues for strtoq and strtouq
Fix gcc warnings.
Fix RCSID's


# 109d9174 19-Jun-1997 mikel <mikel@NetBSD.org>

avoid unportable arithmetic on void pointers


# a13d8bf8 19-Dec-1996 cgd <cgd@NetBSD.org>

use __inline and __asm, rather than inline and asm. By default (without -g)
lint won't accept the latter two, but will accept the former two as valid.
As far as gcc's concerned, they're the same.


# 6dda330e 28-Dec-1995 thorpej <thorpej@NetBSD.org>

New-style RCS ids.


# 2f86deea 16-Jun-1994 mycroft <mycroft@NetBSD.org>

Add RCS ids.


# 9c20f740 26-Aug-1993 jtc <jtc@NetBSD.org>

Declare rcsid strings so they are stored in text segment.


# e9d867ef 01-Aug-1993 mycroft <mycroft@NetBSD.org>

Add RCS identifiers.


# 61f28255 21-Mar-1993 cgd <cgd@NetBSD.org>

initial import of 386bsd-0.1 sources