Fwd: Suboptimal java.lang.record's methods generation
Brian Goetz
brian.goetz at oracle.com
Sun Feb 14 19:08:03 UTC 2021
Received on amber-spec-comments.
-------- Forwarded Message --------
Subject: Suboptimal java.lang.record's methods generation
Date: Sun, 14 Feb 2021 12:13:06 +0000
From: Rowicki, Michal <Michal.Rowicki at vimn.com>
To: amber-spec-comments at openjdk.java.net
<amber-spec-comments at openjdk.java.net>
Hello!
I’ve realized that Java 16 generates suboptimal bytecode for
java.lang.record. In comparison w Lombok there is a huge difference in
toString() method as current Java’s implementation uses String.format
method to generate output. All differences can be found at my sample
repository:
https://github.com/wyhasany/lombokVsRecord
I supposed that java.lang.record should have the very same performance
as Lombok’s @Value:
https://projectlombok.org/features/Value
Do you think is it a worth a ticket?
Thanks!
Michał
More information about the amber-dev
mailing list