mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
Update py_dict.c
This commit is contained in:
parent
cd8ae22c2b
commit
178bfa4c32
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user