revised patch to qsort

djamel anonymous djam8193ah@hotmail.com
Tue Jun 27 12:56:00 GMT 2006


hello all, after my last mail i made a search on this mailing list i 
discovered that there has already been a proposed version by wolfgang glas 
dated 8 Jun 2004.the reason for which the sugestion was rejected
was because the standard requires omparison function be passed only pointers 
from the original array.
i revised my own version to call the comparison function with arguments only 
from the original array.
by benchmarking on an array of 2 millions 32 bits unsigned integers on 
athlon xp 1700+ i found the following results:
random aray:
original qsort 1.93 seconds
modified qsort 1.60 secons
reverse sorted aray:
original qsort 1.32 seconds
modified qsort 0.94 secons
i have attached only the modified version of the file msort.c
best regards.

_________________________________________________________________
MSN Messenger : appels gratuits de PC à PC ! 
http://www.msn.fr/newhotmail/Default.asp?Ath=f
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_msort2.c
Type: text/x-csrc
Size: 5110 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20060627/41b8d482/attachment.bin>


More information about the Libc-alpha mailing list