RFR: 8267943: Improve performance of EventWriter by improving varint encoding implementation [v2]

Markus Gronlund markus.gronlund at oracle.com
Fri Jun 4 14:29:33 UTC 2021


Hi Richard,

Thanks for this suggestion, it looks interesting indeed - I will try to get around looking into it in more detail.

Unfortunately, the existing performance regression tests are not yet easily available in the open. This is due to legacy reasons only, but it means there is nothing you can easily run, at least not JMH-wise.

I will try to take a look at your suggestion and run our internal JMH's as well.

On a formal note, and sorry to have to ask, have you signed the Oracle Contributor Agreement  (OCA) [1]?

Also, is there an associated Enhancement request related to this work in the bug database [2]? 

Cheers
Markus

[1] https://openjdk.java.net/contribute/
[2] https://bugs.openjdk.java.net/ 




-----Original Message-----
From: hotspot-jfr-dev <hotspot-jfr-dev-retn at openjdk.java.net> On Behalf Of Richard Startin
Sent: den 4 juni 2021 15:29
To: hotspot-jfr-dev at openjdk.java.net
Subject: Re: RFR: 8267943: Improve performance of EventWriter by improving varint encoding implementation [v2]

On Fri, 4 Jun 2021 11:56:16 GMT, Richard Startin <github.com+16439049+richardstartin at openjdk.org> wrote:

>> This PR improves the performance of committing events with numeric correlation ids by precomputing the number of continuation bytes required by each varint and storing them in a lookup table addressable by the input `long`'s leading zero count. In some rough [benchmarks](https://github.com/richardstartin/jfr-events/blob/master/src/main/java/io/github/richardstartin/jfrevents/CommitEventBenchmark.java), this shows a negligible regression for committing empty events, but a 15% improvement for committing an event with two random 64 bit identifiers.
>
> Richard Startin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   shortcuts for small values

After the second commit this no longer regresses on committing empty events and is still faster on those with random identifiers. 

Are there any performance regression tests I can use to demonstrate this doesn't regress on typical use cases?

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

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


More information about the hotspot-jfr-dev mailing list