Hi, a few of the ImmutableCollections are inheriting size and/or isEmpty from abstract base classes. A few of these are inefficiently implemented, e.g., on a Map1, isEmpty() will effectively be "return entrySet().size() == 0" when it could be simply "return false".
This patch provide specialized implementations which JITs do the right thing while also helping startup slightly. Bug: https://bugs.openjdk.java.net/browse/JDK-8221921 Webrev: http://cr.openjdk.java.net/~redestad/8221921/open.00/ Testing: tier1-2, verified a tiny improvement in startup profiles Thanks! /Claes
