RFR 8081027: Create a common test to check adequacy of initial size of static HashMap/ArrayList fields
ivan.gerasimov at oracle.com
Mon May 25 23:07:05 UTC 2015
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
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?
More information about the core-libs-dev