docs: @SuppressWarnings("SameParameterValue")
      private static void insertionSort(double[] key, double[][] values, int start, int end, int limit) {
          // loop invariant: all values start ... i-1 are ordered
          for (int i = start + 1; i < end; i++) {
              double v = key[i];
              int m = Math.max(i - limit, start);
              for (int j = i; j >= m; j--) {
                  if (j == m || key[j - 1] <= v) {
                      if (j < i) {
                          System.arraycopy(key, j, key, j + 1, i - j);
                          key[j] = v;
                          for (double[] value : values) {
                              double tmp = value[i];
                              System.arraycopy(value, j, value, j + 1, i - j);
                              value[j] = tmp;
                          }
                      }
                      break;
                  }
              }
          }
      }