On Sun, 31 Jan 2021 08:18:28 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

>> Martin Buchholz has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   address comments from @amalloy; introduce technically correct use of 
>> "numeral"
>
> test/micro/org/openjdk/bench/java/util/regex/Trim.java line 119:
> 
>> 117:         assert ! lookBehind_find();
>> 118:         assert ! find_loop_two_matchers();
>> 119:         assert ! find_loop_usePattern();
> 
> At a risk of muddling the profiles a bit, this can be rewritten as:
> 
>  if (!simple_find()) throw new IllegalStateException("simple_find is 
> incorrect");
>  ...

Thanks Aleksey.  But I was hoping for something more magical.

We really want the checking of the result of the benchmark method to be 
co-located in the source code with the method, but with zero disturbance to the 
benchmark numbers.  Is such magic possible?

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

PR: https://git.openjdk.java.net/jdk/pull/1940

Reply via email to