RFR: 8155600 - Performance optimization of Arrays.asList().iterator()
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Apr 28 13:52:56 UTC 2016
On 04/28/2016 10:37 AM, Tagir F. Valeev wrote:
> Hello!
>
> Please review and sponsor the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8155600
> http://cr.openjdk.java.net/~tvaleev/webrev/8155600/r1/
I like the motivation and the patch.
Nitpicks:
*) Does EA break if you make ArrayItr inner class to gain the access to
E[] a?
*) next(): Missing braces in throw new NSEE() block;
*) next(): Why loading this.a into local?
> What do you think? Is it reasonable change? Should I check some tests
> or add new ones for this optimization?
I think Arrays.asList is frequently used in tests already. But, a quick
boundary jtreg test would be nice to have, given now we have a special
iterator.
Thanks,
-Aleksey
More information about the core-libs-dev
mailing list