patch to qsort
djamel anonymous
djam8193ah@hotmail.com
Tue Jun 20 22:52:00 GMT 2006
Hello, this time i am resending my patch that divides by two the memory
usage of merge sort
used inside qsort(). this patch also reduces the recusrion depth by 1 level
in many cases.
i haven't compiled the file as is because i haven't downloaded the full
glibc source, but i
am 99% sure that it will compile.the test on a random 500k integer elements
vector gave
0.40 seconds with the original and 0.37 second with the patched version.
with the vector
originally in reverse order this gave 0.25 with the original version and
0.20 with the
patched version.
best regards.
_________________________________________________________________
Testez Windows Llive Mail Beta !
http://www.msn.fr/newhotmail/Default.asp?Ath=f
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_msort.c
Type: text/x-csrc
Size: 4477 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20060620/a4c62d1e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msort.c.diff
Type: text/x-patch
Size: 1904 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20060620/a4c62d1e/attachment-0001.bin>
More information about the Libc-alpha
mailing list