Class TimsortUtils
java.lang.Object
io.deephaven.engine.table.impl.sort.timsort.TimsortUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The initial setting for the number of consecutive values taken from either run1 or run2 before we switch to galloping mode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getRunLength
(int length) Given a length of our input, we should pick a number that is between 32 and 64; ideally such that (length / run) is just under 2^n < length, but only by a little bit.
-
Field Details
-
INITIAL_GALLOP
public static final int INITIAL_GALLOPThe initial setting for the number of consecutive values taken from either run1 or run2 before we switch to galloping mode.- See Also:
-
-
Constructor Details
-
TimsortUtils
public TimsortUtils()
-
-
Method Details
-
getRunLength
public static int getRunLength(int length) Given a length of our input, we should pick a number that is between 32 and 64; ideally such that (length / run) is just under 2^n < length, but only by a little bit. Take the six most significant bits of length; if the remaining bits have any ones, then add one.- Parameters:
length
- the length of the values within a chunk to sort- Returns:
- the run length
-