1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 23:50:19 +02:00

tune default hash table sizes

* libguile/modules.c: In my current image, there are 1790 bindings in
  the root module, which tips over to the next hash vector size, so
  declare that to prevent rehashing.
* libguile/srcprop.c (scm_init_srcprop): Don't preallocate a big
  source_whash table, as we might not need it (if everything is
  compiled, for example).
* module/ice-9/boot-9.scm (make-module): Don't preall-cate big hash
  tables for imported bindings.  Instead trust that resizing works
  correctly.
This commit is contained in:
Andy Wingo 2012-02-19 15:19:14 +01:00
parent 3753e22736
commit 917b0e72f7
3 changed files with 4 additions and 8 deletions

View file

@ -347,7 +347,7 @@ scm_init_srcprop ()
scm_tc16_srcprops = scm_make_smob_type ("srcprops", 0);
scm_set_smob_print (scm_tc16_srcprops, srcprops_print);
scm_source_whash = scm_c_make_weak_table (2047, SCM_WEAK_TABLE_KIND_KEY);
scm_source_whash = scm_c_make_weak_table (0, SCM_WEAK_TABLE_KIND_KEY);
scm_c_define ("source-whash", scm_source_whash);
scm_last_alist_filename = scm_cons (SCM_EOL,