Suboptimal java.lang.record's methods generation

Rowicki, Michal Michal.Rowicki at vimn.com
Sun Feb 14 12:13:06 UTC 2021


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-spec-comments mailing list