#
319291 |
|
31-May-2017 |
delphij |
MFC r318514-r318515, r318517, r318917
r318514: Use size_t.
Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11
r318515: The current qsort(3) implementation ignores the sizes of partitions, and always perform recursion on the left partition, then use a tail call to handle the right partition. In the worst case this could require O(N) levels of recursions.
Reduce the possible recursion level to log2(N) by always recursing on the smaller partition instead.
Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096
r318517: Sync qsort.c with userland r318515.
(Note that MIN macro is removed in favor of sys/param.h's version).
PR: 213922
r318917: Disconnect heimdal version of qsort.c from build because we are already using libc's version of qsort.
PR: bin/213922
|
#
319290 |
|
31-May-2017 |
delphij |
Partial MFC r288030 (rodrigc):
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
|
#
319289 |
|
31-May-2017 |
delphij |
MFC r279663,r279666 (pfg):
r279663:
qsort(3): enhance to handle 32-bit aligned data on 64-bit systems
Implement a small enhancement to the original qsort implementation: If the data is 32 bit aligned we can side-step the long type version and use int instead.
The change brings a modest but significant improvement in 32 bit workloads.
r279666:
qsort(3): small style(9) cleanups.
Basically spaces vs. tabs. No functional change.
|
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
251672 |
|
12-Jun-2013 |
emaste |
Renumber clauses to reduce diffs to other versions
NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3, so follow suit to make comparison easier.
|
#
175317 |
|
14-Jan-2008 |
das |
Changing 'r' to a size_t in the previous commit turned quicksort into slowsort for some sequences because different parts of the code used 'r' to store two different things, one of which was signed. Clean things up by splitting 'r' into two variables, and use a more meaningful name.
|
#
175259 |
|
13-Jan-2008 |
das |
Use size_t to avoid overflow when sorting arrays larger than 2 GB.
PR: 111085 MFC after: 2 weeks
|
#
165903 |
|
08-Jan-2007 |
imp |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
#
103165 |
|
10-Sep-2002 |
wollman |
Implement C99's _Exit() interface. Implement a version of qsort that provides a thunk to the comparison function.
Update manual pages.
|
#
92986 |
|
22-Mar-2002 |
obrien |
Fix the style of the SCM ID's. I believe have made all of libc .c's as consistent as possible.
|
#
92905 |
|
21-Mar-2002 |
obrien |
Remove __P() usage.
|
#
92889 |
|
21-Mar-2002 |
obrien |
Remove 'register' keyword.
|
#
50476 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
22993 |
|
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
#
17971 |
|
31-Aug-1996 |
bde |
Don't depend in the kernel on the gcc feature of doing arithmetic on pointers of type `void *'. Warn about this in future.
|
#
15312 |
|
19-Apr-1996 |
bde |
Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only need <sys/types.h> because they use u_xxx.
|
#
13030 |
|
26-Dec-1995 |
bde |
Added prototypes.
|
#
8870 |
|
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
#
1574 |
|
27-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1573, which included commits to RCS files with non-trunk default branches.
|
#
1573 |
|
27-May-1994 |
rgrimes |
BSD 4.4 Lite Lib Sources
|