From c5842cf6443eaf1dc107e9cd234b801047031593 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 1 Apr 2009 10:33:46 +0000 Subject: Speed up increase in growth size. Made one test run 4 times faster. --- src/SplitVector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/SplitVector.h b/src/SplitVector.h index 76f9a8f36..af4e890e3 100644 --- a/src/SplitVector.h +++ b/src/SplitVector.h @@ -43,7 +43,7 @@ protected: /// reallocating if more space needed. void RoomFor(int insertionLength) { if (gapLength <= insertionLength) { - if (growSize * 6 < size) + while (growSize < size / 6) growSize *= 2; ReAllocate(size + insertionLength + growSize); } -- cgit v1.2.3