mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
Rehash weak hash tables less frequently.
* libguile/hashtab.c (weak_bucket_assoc): Call `scm_i_rehash' only when REMAINING is below `SCM_HASHTABLE_LOWER (table)'.
This commit is contained in:
parent
3854d5fd23
commit
70249b9857
1 changed files with 2 additions and 1 deletions
|
@ -222,7 +222,8 @@ weak_bucket_assoc (SCM table, SCM buckets, size_t bucket_index,
|
|||
remaining = SCM_HASHTABLE_N_ITEMS (table) - args.removed_items;
|
||||
SCM_SET_HASHTABLE_N_ITEMS (table, remaining);
|
||||
|
||||
scm_i_rehash (table, hash_fn, closure, "weak_bucket_assoc");
|
||||
if (remaining < SCM_HASHTABLE_LOWER (table))
|
||||
scm_i_rehash (table, hash_fn, closure, "weak_bucket_assoc");
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue