HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3854d5f
)
Rehash weak hash tables less frequently.
author
Ludovic Courtès
<ludo@gnu.org>
Thu, 16 Dec 2010 16:07:50 +0000
(17:07 +0100)
committer
Ludovic Courtès
<ludo@gnu.org>
Thu, 16 Dec 2010 22:45:23 +0000
(23:45 +0100)
* libguile/hashtab.c (weak_bucket_assoc): Call `scm_i_rehash' only when
REMAINING is below `SCM_HASHTABLE_LOWER (table)'.
libguile/hashtab.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/hashtab.c
b/libguile/hashtab.c
index
d5f39cb
..
b7cc72b
100644
(file)
--- a/
libguile/hashtab.c
+++ b/
libguile/hashtab.c
@@
-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;