Skip to content
Snippets Groups Projects
Commit 8e047625 authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Change array shrink threshold to match python's

parent 312bddee
No related branches found
No related tags found
No related merge requests found
Pipeline #2631 failed
......@@ -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);
}
......
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