code: @Benchmark void codePointBeforeNoSurrogates(int reps) {
      final int length = Math.min(this.length, MIN_SURROGATE);
      StringBuilder sb = new StringBuilder();
      for (int j = 0; j < length; j++) {
        sb.appendCodePoint(j);
      }
      for (int i = 0; i < reps; i++) {
        for (int j = 0; j < 4; j++) {
          for (int k = 1; k < length; k++) {
            if (sb.codePointBefore(k) > MIN_SURROGATE)
              throw new Error();
          }
        }
      }
    }
docs: Times .codePointBefore(int) when no surrogates are present.