Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
Description
There are several places where an array of ints gets added to an int vector, by iterating over the array, and calling the add(int) method. This can be improved by having a bulk add operation that does various growing/bounds check just once, and then does the copy using System.arraycopy. This has a measurable effect (not too much, but observable) on things such as CAS serialization.