Skip to content
Snippets Groups Projects
Commit 48f41d81 authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Change array shrink threshold to match python's

parent 3f2c2dab
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ index_in_array (const Array *array, ...@@ -69,7 +69,7 @@ index_in_array (const Array *array,
static void static void
maybe_shrink (Array *array) 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); resize_array (array, array->length);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment