[Webkit-unassigned] [Bug 186747] Reduce HashTable capacity wastage
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 16 23:30:36 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=186747
--- Comment #1 from Darin Adler <darin at apple.com> ---
I’m not 100% sure exactly what part of the memory we consider the "wasted" part, but our policy for hash tables is based on these constants:
static const unsigned m_maxLoad = 2;
static const unsigned m_minLoad = 6;
The units here are fraction of table full. So we expand a hash table as soon as 50% (1/2) of the buckets are full and we shrink a hash table if only 17% (1/6) of the buckets are full.
When we shrink, we always shrink to half the current size and when we expand, we typically expand to double the current size.
I agree that we can make improvements by changing these policies.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180617/7bef54d5/attachment.html>
More information about the webkit-unassigned
mailing list