-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
25
-
jdk-25+22-94-g0318e49500e
-
generic
-
generic
I happened to notice a couple of places in ArrayDeque where the code is setting a contiguous range of Object[] elements to null using a for() loop. This is done to preserve the invariant that unused elements in the array are always null.
These clear operations should be done instead with Arrays.fill(), which is presumably faster.
The two spots are in the methods grow() and circularClear().
These clear operations should be done instead with Arrays.fill(), which is presumably faster.
The two spots are in the methods grow() and circularClear().
- links to
-
Review(master) openjdk/jdk/25237