Goonstation 13 - Modules - TypesDefine Details

_std/sorting.dm

/proc/sortList sortList - To sort lists via TimSort (in place)
/proc/sortListCopy Just like /proc/sortList, but return a sorted copy of the given list
MIN_MERGEMinimum sized sequence that will be merged. Anything smaller than this will use binary-insertion sort. Should be a power of 2
MIN_GALLOPWhen we get into galloping mode, we stay there until both runs win less often than MIN_GALLOP consecutive times.
/var/sortInstance This is a global instance to allow much of this code to be reused. The interfaces are kept separately

Define Details

MIN_GALLOP

When we get into galloping mode, we stay there until both runs win less often than MIN_GALLOP consecutive times.

MIN_MERGE

Minimum sized sequence that will be merged. Anything smaller than this will use binary-insertion sort. Should be a power of 2