From 807d6a0cf4fc5207fdde512730c9e02e3e85edab Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 18 Dec 2018 16:22:54 -0800 Subject: [PATCH] crucial performance optimization --- .../java/baritone/pathing/calc/openset/BinaryHeapOpenSet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/calc/openset/BinaryHeapOpenSet.java b/src/main/java/baritone/pathing/calc/openset/BinaryHeapOpenSet.java index 6758a30a..33f077b9 100644 --- a/src/main/java/baritone/pathing/calc/openset/BinaryHeapOpenSet.java +++ b/src/main/java/baritone/pathing/calc/openset/BinaryHeapOpenSet.java @@ -59,7 +59,7 @@ public final class BinaryHeapOpenSet implements IOpenSet { @Override public final void insert(PathNode value) { if (size >= array.length - 1) { - array = Arrays.copyOf(array, array.length * 2); + array = Arrays.copyOf(array, array.length << 1); } size++; value.heapPosition = size;