[Bug 135718] [patch] enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 9 14:57:22 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=135718

--- Comment #8 from Pedro F. Giffuni <pfg at FreeBSD.org> ---
Created attachment 152798
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152798&action=edit
Updated patch by Andrey Chernov

I updated the testing utility with 4096 datapoints of random data and
I did some very basic testing with an updated patch from Andrey :

$ 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).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list