compareTo
Unsigned lexicographic comparison; the shorter key wins when one is a prefix of the other.
Arrays.compareUnsigned is used rather than a hand-written loop because the JDK intrinsifies it, and key comparison is the innermost operation of every lookup and every merge.