Details
-
Enhancement
-
Resolution: Fixed
-
P5
-
None
-
b03
Description
There are couple of places where ArrayList is used a FIFO structure.
Using ArrayDeque would be more efficient.
src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java
private final Map<List<String>, List<ReusableContext>> options2Contexts;
(value type is in fact ArrayList)
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java
Map<ClassSymbol, ArrayList<RewritingContext>> Q = new HashMap<>();
Using ArrayDeque would be more efficient.
src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java
private final Map<List<String>, List<ReusableContext>> options2Contexts;
(value type is in fact ArrayList)
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java
Map<ClassSymbol, ArrayList<RewritingContext>> Q = new HashMap<>();
Attachments
Issue Links
- relates to
-
JDK-8033158 Eliminate inefficient use of ArrayList.remove in Scanner
-
- Open
-
- links to