crucial performance optimization
This commit is contained in:
parent
a0ab2a8ba7
commit
807d6a0cf4
@ -59,7 +59,7 @@ public final class BinaryHeapOpenSet implements IOpenSet {
|
|||||||
@Override
|
@Override
|
||||||
public final void insert(PathNode value) {
|
public final void insert(PathNode value) {
|
||||||
if (size >= array.length - 1) {
|
if (size >= array.length - 1) {
|
||||||
array = Arrays.copyOf(array, array.length * 2);
|
array = Arrays.copyOf(array, array.length << 1);
|
||||||
}
|
}
|
||||||
size++;
|
size++;
|
||||||
value.heapPosition = size;
|
value.heapPosition = size;
|
||||||
|
Loading…
Reference in New Issue
Block a user