RFR 8081027: Create a common test to check adequacy of initial size of static HashMap/ArrayList fields
Ivan Gerasimov
ivan.gerasimov at oracle.com
Mon May 25 23:07:05 UTC 2015
Hello!
This is in some way continuation of JDK-8080535 (Expected size of
Character.UnicodeBlock.map is not optimal).
A new utility class OptimalCapacity was added to jdk.testlibrary package.
The test NonOptimalMapSize.java that had been added with JDK-8080535,
was rewritten with use of this new class.
A couple more tests were added, which utilize methods of
OptimalCapacity for checking sizes of ArrayList and IdentityHashMap
static variables.
Optimization of initial sizes of two more variables saves us one
reallocation during java start-time and a few more bytes of memory.
Would you please help review this fix?
BUGURL: https://bugs.openjdk.java.net/browse/JDK-8081027
WEBREV: http://cr.openjdk.java.net/~igerasim/8081027/00/webrev/
Sincerely yours,
Ivan
More information about the core-libs-dev
mailing list