summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-08 11:27:54 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-08 11:27:54 -0800
commit6e58c041355cf231b3c3e9202baad95c447678cc (patch)
tree2f3a394186eecec599d5ba2a53e139d10dc80312 /tests
parent660af6ed504bac0258834f6e4c58ad81454dbad8 (diff)
downloadtxr-6e58c041355cf231b3c3e9202baad95c447678cc.tar.gz
txr-6e58c041355cf231b3c3e9202baad95c447678cc.tar.bz2
txr-6e58c041355cf231b3c3e9202baad95c447678cc.zip
Median of three pivot selection in quicksort.
* lib.c (med_of_three, middle_pivot): New static functions. (quicksort): Use med_of_three to choose a pivot above a threshold array size, otherwise just the middle element.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions