src/timsort.js
function minRunLength(n) {
  let r = 0;

  while (n >= DEFAULT_MIN_MERGE) {
    r |= (n & 1);
    n >>= 1;
  }

  return n + r;
}
function minRunLength(n) {
  let r = 0;

  while (n >= DEFAULT_MIN_MERGE) {
    r |= (n & 1);
    n >>= 1;
  }

  return n + r;
}
function minRunLength ( n ) { let r = 0 ; while ( n >= DEFAULT_MIN_MERGE ) { r |= ( n & 1 ) ; n >>= 1 ; } return n + r ; }
Compute minimum run length for TimSort

@param {number} n - The size of the array to sort.
Compute minimum run length for TimSort