From 48f41d813521175a7701f769e0cc16bd16f97693 Mon Sep 17 00:00:00 2001
From: Bruce Cowan <bruce@bcowan.me.uk>
Date: Sun, 22 Dec 2019 13:40:39 +0000
Subject: [PATCH] Change array shrink threshold to match python's

---
 lib/types/array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/types/array.c b/lib/types/array.c
index ed4c91f..59b3bbc 100644
--- a/lib/types/array.c
+++ b/lib/types/array.c
@@ -69,7 +69,7 @@ index_in_array (const Array *array,
 static void
 maybe_shrink (Array *array)
 {
-    if (array->length <= (size_t) ceil (array->capacity * 0.3))
+    if (array->length <= (size_t) ceil (array->capacity / 2))
         resize_array (array, array->length);
 }
 
-- 
GitLab