RFR: 8209120: Archive the Integer.IntegerCache (original) (raw)

Stephen Colebourne scolebourne at joda.org
Thu Aug 9 11:42:41 UTC 2018


On 9 August 2018 at 12:33, Claes Redestad <claes.redestad at oracle.com> wrote:

using the new ability to archive immutable heap graphs into the CDS archive, even archiving small things like the Integer.IntegerCache can be profitable.

Interesting. I did consider caching some instances of LocalDate when I was developing JSR-310 (say 1 year either side of the current date at startup). Maybe an avenue to investigate in the future!

thanks Stephen

Webrev: http://cr.openjdk.java.net/~redestad/8209120/open.00/ Bug: https://bugs.openjdk.java.net/browse/JDK-8209120 For a default cache (256 elements), this change saves us ~1 million instructions. Applications that use -XX:AutoBoxCacheMax can profit further (and we can use this to stress test the archiving feature..) The patch is built on top of and tested with Jiangli's patch for https://bugs.openjdk.java.net/browse/JDK-8207263 and I don't intent to push this before that is in. Thanks! /Claes



More information about the core-libs-dev mailing list