Article 5RQ74 qsort vs 'Magnetica' Quicksort

qsort vs 'Magnetica' Quicksort

by
Sanmayce
from LinuxQuestions.org on (#5RQ74)
Just wrote my qsort() replacement, wanna share it with the community and stress my variant with more versatile data...

Generally, we have three major scenarios:
few distinct keys;
many distinct keys;
ALL distinct keys.

In first two cases, the new implementation is faster or equal to the "Standard" one.
Sadly, in the third case, it is somewhat slower, should be investigated further.

Anyway, benchmarking will show the practical value of 'Magnetica', personally, I started to use it already.
Please, give it a try, my new partitioning scheme is not perfect but pushes the limitations of old ones.

Didn't have time to add the second scenario, but the results (for 1st scenario, with 10 distinct keys) are promising:
273.8/3.7= 74x faster
Attached Files
txt.gifQS_bench.c.txt (18.5 KB)
latest?d=yIl2AUoC8zA latest?i=8s2mpPNHVpM:rmoNZ-_Th44:F7zBnMy latest?i=8s2mpPNHVpM:rmoNZ-_Th44:V_sGLiP latest?d=qj6IDK7rITs latest?i=8s2mpPNHVpM:rmoNZ-_Th44:gIN9vFw8s2mpPNHVpM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments