From 178bfa4c3216bbe43b77ffdeefbac39ddbd2eec2 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 23 Nov 2024 16:31:59 +0800 Subject: [PATCH] Update py_dict.c --- src/public/py_dict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/py_dict.c b/src/public/py_dict.c index 5fbddb32..634cdf91 100644 --- a/src/public/py_dict.c +++ b/src/public/py_dict.c @@ -190,8 +190,8 @@ static bool Dict__set(Dict* self, py_TValue* key, py_TValue* val) { if(res == -1) return false; // error } // no empty slot found - if(self->capacity >= self->entries.length * 20) { - // raise error if we reach the minimum load factor (5%) + if(self->capacity >= self->entries.length * 10) { + // raise error if we reach the minimum load factor (10%) return RuntimeError("dict has too much collision: %d/%d/%d", self->entries.length, self->entries.capacity,