Skip to content

Commit 537bcf0

Browse files
committed
improve alloc
1 parent 9ba4ff6 commit 537bcf0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/ai/timefold/solver/core/impl/util/ElementAwareArrayList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public final class ElementAwareArrayList<T extends @Nullable Object>
3939
private static final Object[] EMPTY_ARRAY = new Object[0];
4040
private static final int REMOVED_POSITION = -1;
4141

42-
private static final int DEFAULT_CAPACITY = 8;
42+
private static final int DEFAULT_CAPACITY = 2;
4343
private static final int RETAIN_THRESHOLD = DEFAULT_CAPACITY; // Retain backing array when length <= this.
4444
private Object @Nullable [] entries = EMPTY_ARRAY;
4545
private int lastElementPosition = -1;

0 commit comments

Comments
 (0)