mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
qsort was a heapsort. It sorted correctly, but elements that compare equal ended in a different order from FreeBSD's Bentley-McIlroy qsort, in 18947 of 20000 random arrays with repeated keys, and below 7 elements, where FreeBSD's insertion sort keeps equal elements in place, a heapsort does not. qsort now follows FreeBSD 11 qsort.c, including its comparator call sequence. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VZWLdTjf1S57iLgn2rcaFb