Modules

IntroSort

moduleSource
macOSLinuxWindowswasm

#import "IntroSort";

The comparator sorts that Sort is built from, for callers that want a specific algorithm.

Procedures#

(array: [] $T, f: (T, T) -> $R)

Sorts an array view in place with a three-way comparator: negative, zero or positive. Quicksort partitions around a median of three; a range that nests too deep falls back to heap_sort, and short ranges finish with insertion_sort.

(array: [] $T, f: (T, T) -> $R)

Sorts an array view in place by insertion with a three-way comparator.