GNOME Bugzilla – Bug 118210
allow to set intial hash table size
Last modified: 2018-05-24 10:28:31 UTC
there is no currenty ability to set initial size of hash_table. despite someone want to create big hashtable and know that (eg. 1000000 items) hash always starts from 11 items and has to do unnecessary reallocations.
Hmm, it would have to be somethign like: g_hash_table_set_min_buckets() since otherwise, it would be unclear when you should start resizing the hash table smaller again when you removed items.
Created attachment 99699 [details] [review] Adds g_hash_table_set_min_capacity() Patch adds getter and setter for hash_table->min_capacity, which is used as lower bounds for g_hash_table_resize().
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/12.