RFR: 8260053: Optimize Tokens' use of Names [v2]

Adam Sotona asotona at openjdk.java.net
Fri Jan 22 07:32:41 UTC 2021

On Thu, 21 Jan 2021 19:16:15 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:

>> Looks great - and much simpler. Have you tried running some benchmark?
>> If you are not familiar with JMH, another way to quickly (and unofficially :-) benchmark javac is typically trying to clean/build the JDK before/after the change and see if there's an impact. Since this change affects tokenization, if there's a regression you should be able to see it.
>> If you are familiar with JMH, and alternative would be to setup a compilation task using the compiler API, and then just parse some files.
> @mcimadamore As you can see my previous comment, the project jmh-jdk-microbenchmarks already had the benchmark we need. I thought we shouldn't do the repetitive work so I used it but failed to build it. It is better to run the jmh-jdk-microbenchmarks than run the newly written test.
> If the jmh-jdk-microbenchmarks still fails, I will write a new benchmark test tomorrow.

@lgxbslgx jmh-jdk-microbenchmarks contain a lot of various benchmarks and even micros-javac-... part can take hours if you run it all. As you mention you've successfully built jmh-jdk-microbenchmarks and so to execute only minimal necessary javac benchmarks in local environment you need to limit executed benchmarks to GroupJavacBenchmark only by command line: `java -jar micros-javac/target/micros-javac-1.0-SNAPSHOT.jar .+GroupJavacBenchmark.+` 
The argument given to JMH benchmarks is regular expression specifying what benchmarks to execute and by default it executes everything bundled.


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

More information about the compiler-dev mailing list