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

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Jan 21 22:16:50 UTC 2021


On Thu, 21 Jan 2021 18:46:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use Map<String, TokenKind>
>
> 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.

@asotona can you please help?

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

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


More information about the compiler-dev mailing list