-
Enhancement
-
Resolution: Fixed
-
P3
-
6
-
b15
-
generic
-
generic
-
Not verified
Academics like to compare the performance of Java against other
language frameworks. Due to a lack of creativity, they often pick
collection iteration as a particularly interesting number. E.g. here
is one article where ArrayList iteration makes a particulary poor showing.
http://www.cs.cornell.edu/andru/papers/jmatch2.pdf
By specializing the Vector and ArrayList iterators, we can achieve up to
a factor of two performance improvement with -client; somewhat less with -server.
The Vector iterator only needs to synchronize in next(), not in hasNext().
The ArrayList iterator suffers due to the polymorphic virtual call to get() in next()
that hotspot is known to have troubles with.
This performance improvement is quite important.
language frameworks. Due to a lack of creativity, they often pick
collection iteration as a particularly interesting number. E.g. here
is one article where ArrayList iteration makes a particulary poor showing.
http://www.cs.cornell.edu/andru/papers/jmatch2.pdf
By specializing the Vector and ArrayList iterators, we can achieve up to
a factor of two performance improvement with -client; somewhat less with -server.
The Vector iterator only needs to synchronize in next(), not in hasNext().
The ArrayList iterator suffers due to the polymorphic virtual call to get() in next()
that hotspot is known to have troubles with.
This performance improvement is quite important.
- relates to
-
JDK-8158160 Change in behaviour of ArrayList iterator between JDK 6 and JDK 7
-
- Closed
-
-
JDK-5103956 (coll) Suggested improvement to speed up ArrayList<E> get and set calls
-
- Closed
-