Integrated: 8304420: Regression ~11% with Javac-Generates on all platforms in b14

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Mar 20 18:47:36 UTC 2023


On Mon, 20 Mar 2023 16:42:00 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This patch fixes a performance regression introduced by  JDK-8303820. The new code for dealing with type metadata makes excessive use of streams and optionals, leading to performance degradation. I've tweaked the code to use plain for loops, and also to use `null` instead of optionals. I've also added a new `getMetadata` method which accepts a map function (if metadata is found) as well as a default value (if metadata is not found) which makes usage from clients similar to just using optionals. This seems to revert performance numbers to what they were before the fix.

This pull request has now been integrated.

Changeset: 42723dcb
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/42723dcb1862da598092bb499056940d78a8bdac
Stats:     33 lines in 2 files changed: 17 ins; 2 del; 14 mod

8304420: Regression ~11% with Javac-Generates on all platforms in b14

Reviewed-by: vromero

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

PR: https://git.openjdk.org/jdk/pull/13104


More information about the compiler-dev mailing list