RFR (XXS) 8080535: (ch) Expected size of Character.UnicodeBlock.map is not optimal (original) (raw)
Martin Buchholz martinrb at google.com
Mon May 18 18:52:15 UTC 2015
- Previous message: RFR (XXS) 8080535: (ch) Expected size of Character.UnicodeBlock.map is not optimal
- Next message: RFR (XXS) 8080535: (ch) Expected size of Character.UnicodeBlock.map is not optimal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, May 15, 2015 at 5:59 PM, Ivan Gerasimov <ivan.gerasimov at oracle.com> wrote:
On 16.05.2015 2:18, Martin Buchholz wrote: I wouldn't bother defining the constant. I only need it in the regression test, to check whether it was sufficient.
The problem you're trying to solve is (a small amount of) startup overhead. Don't introduce more startup overhead (another constant in the class file) just to make your change more testable.
If you're serious about reducing overhead for static maps, you could:
- write a java agent that verifies that all maps stored in static fields are never resized or oversized, and run all jtreg tests with that agent
- use a true immutable static compact map implementation, perhaps optimized for String keys, in the spirit of jdk/src/share/classes/sun/util/PreHashedMap.java
- initialize the static maps from a binary blob stored in a resource instead of from java code
but any of those is a lot of work. I would just check in the fix to s/256/BETTER_SIZE/
- Previous message: RFR (XXS) 8080535: (ch) Expected size of Character.UnicodeBlock.map is not optimal
- Next message: RFR (XXS) 8080535: (ch) Expected size of Character.UnicodeBlock.map is not optimal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]