Re: RFR: 8259074: regex benchmarks and tests [v2]
On Mon, 1 Feb 2021 00:23:56 GMT, Martin Buchholz wrote: >> 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? I refactored the correctness checking, no longer using the assert facility. - PR: https://git.openjdk.java.net/jdk/pull/1940
Re: RFR: 8259074: regex benchmarks and tests [v2]
On Sun, 31 Jan 2021 08:18:28 GMT, Aleksey Shipilev 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
Re: RFR: 8259074: regex benchmarks and tests [v2]
On Sat, 30 Jan 2021 22:43:10 GMT, Martin Buchholz wrote: >> 8259074: regex benchmarks and tests > > 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"); ... - PR: https://git.openjdk.java.net/jdk/pull/1940
Re: RFR: 8259074: regex benchmarks and tests [v2]
> 8259074: regex benchmarks and tests 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" - Changes: - all: https://git.openjdk.java.net/jdk/pull/1940/files - new: https://git.openjdk.java.net/jdk/pull/1940/files/cf0922f4..abb6c672 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=1940=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=1940=00-01 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/1940.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1940/head:pull/1940 PR: https://git.openjdk.java.net/jdk/pull/1940