mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05: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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZWLdTjf1S57iLgn2rcaFb