RFR: 8297561: Redundant index check in String.offsetByCodePoints() [v2]

Sergey Tsypanov stsypanov at openjdk.org
Thu Dec 1 08:07:26 UTC 2022


On Wed, 30 Nov 2022 20:41:47 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Sergey Tsypanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8297561
>>  - 8297561: Add benchmark
>>  - 8297561: Redundant index check in String.offsetByCodePoints()
>
> test/micro/org/openjdk/bench/java/lang/StringOffsetByCodePoints.java line 1:
> 
>> 1: package org.openjdk.bench.java.lang;
> 
> Missing copyright header

Good point, fixed

> test/micro/org/openjdk/bench/java/lang/StringOffsetByCodePoints.java line 9:
> 
>> 7: @BenchmarkMode(Mode.AverageTime)
>> 8: @OutputTimeUnit(TimeUnit.NANOSECONDS)
>> 9: @Warmup(iterations = 10, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
> 
> For non-allocating microbenchmarks we usually get by with about 5 iterations of 1 second and same for warmup to produce stable results. Keeping runtime low ensures we can keep adding coverage to more APIs without incurring undue overhead

Fixed

-------------

PR: https://git.openjdk.org/jdk/pull/11350


More information about the core-libs-dev mailing list