RFR(s): JDK-8214687 Optimize Collections.nCopies().hashCode()

Martin Buchholz martinrb at google.com
Wed Dec 12 04:01:55 UTC 2018

> In performance critical code, we don't trust hotspot to not reload final
> fields.  Other forEach methods do this, e.g.

        final Object[] es = queue;
        for (int i = 0, n = size; i < n; i++)
            action.accept((E) es[i]);

More information about the core-libs-dev mailing list