algorithms.timsort

Source code: algorithms/timsort.seq

algorithms.timsort.BLOCK_SIZE
algorithms.timsort.CACHELINE_SIZE
algorithms.timsort.MIN_GALLOP
algorithms.timsort.tim_sort_array[S, T](collection: Array[T], size: int, keyf: Callable[T, S])

Timsort By Tim Peters, published at https://github.com/python/cpython/blob/master/Objects/listobject.c#L2187

Sorts the array inplace.

algorithms.timsort.tim_sort_inplace[S, T](collection: List[T], keyf: Callable[T, S])

Timsort By Tim Peters, published at https://github.com/python/cpython/blob/master/Objects/listobject.c#L2187

Sorts the list inplace.

algorithms.timsort.tim_sort[S, T](collection: List[T], keyf: Callable[T, S])

Timsort By Tim Peters, published at https://github.com/python/cpython/blob/master/Objects/listobject.c#L2187

Returns a sorted list.