Page MenuHomeFreeBSD

PR 135718 enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems
ClosedPublic

Authored by pfg on Feb 1 2015, 9:12 PM.

Diff Detail

Repository
rS FreeBSD src repository
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

pfg updated this revision to Diff 3582.Feb 1 2015, 9:12 PM
pfg retitled this revision from to PR 135718 enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems.
pfg updated this object.
pfg edited the test plan for this revision. (Show Details)
emaste added a subscriber: emaste.Feb 6 2015, 8:40 PM
pfg abandoned this revision.Feb 7 2015, 2:51 PM

This appears to be only a prototype. The code is not ready for public consumption yet. It will be worked through bugzilla first.

pfg updated this revision to Diff 4075.Mar 2 2015, 7:55 PM

Updated version by ache@

Updating D1752: PR 135718 enhance qsort(3) to properly handle 32-bit aligned data on

64-bit systems

pfg reclaimed this revision.Mar 2 2015, 7:59 PM

Here is some testing I did not long ago:
...
I updated the testing utility with 4096 23 bit datapoints of random data.
...

$ time ./test-heapsort
1..1
ok 1 - heapsort

27.83 real        27.61 user         0.00 sys

$ time ./test-mergesort
1..1
ok 1 - mergesort

27.02 real        26.83 user         0.00 sys

$ time ./test-qsort (old)
1..1
ok 1 - qsort

27.07 real        26.94 user         0.00 sys

...
$ time ./test-qsort (new)
1..1
ok 1 - qsort

26.94 real        26.81 user         0.00 sys

...

IMHO. the performance improvements are measurable, and even when they may not seem huge, they are significant enough to make qsort preferable over heapsort and mergesort (at least for my particular dataset).


I will commit the updated version sometime this week, before I forget about it ;).

pfg accepted this revision.Mar 5 2015, 5:02 PM
pfg added a reviewer: pfg.

Committed as revision 279663.

This revision is now accepted and ready to land.Mar 5 2015, 5:02 PM
pfg closed this revision.Mar 5 2015, 5:02 PM