Title: [130419] trunk/Source/WTF
Revision
130419
Author
[email protected]
Date
2012-10-04 12:49:15 -0700 (Thu, 04 Oct 2012)

Log Message

Lower minimum table size of WTF::HashTable to reduce memory usage.
<http://webkit.org/b/98406>
<rdar://problem/12432140>

Reviewed by Anders Carlsson.

Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)

No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
from this, we can tweak individual tables to have a larger minimumTableSize.

* wtf/HashTraits.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (130418 => 130419)


--- trunk/Source/WTF/ChangeLog	2012-10-04 19:34:34 UTC (rev 130418)
+++ trunk/Source/WTF/ChangeLog	2012-10-04 19:49:15 UTC (rev 130419)
@@ -1,3 +1,19 @@
+2012-10-04  Andreas Kling  <[email protected]>
+
+        Lower minimum table size of WTF::HashTable to reduce memory usage.
+        <http://webkit.org/b/98406>
+        <rdar://problem/12432140>
+
+        Reviewed by Anders Carlsson.
+
+        Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
+        This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
+
+        No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
+        from this, we can tweak individual tables to have a larger minimumTableSize.
+
+        * wtf/HashTraits.h:
+
 2012-10-04  Michael Saboff  <[email protected]>
 
         String::remove will convert an 8 bit string to a 16 bit string

Modified: trunk/Source/WTF/wtf/HashTraits.h (130418 => 130419)


--- trunk/Source/WTF/wtf/HashTraits.h	2012-10-04 19:34:34 UTC (rev 130418)
+++ trunk/Source/WTF/wtf/HashTraits.h	2012-10-04 19:49:15 UTC (rev 130419)
@@ -50,7 +50,9 @@
         // The needsDestruction flag is used to optimize destruction and rehashing.
         static const bool needsDestruction = true;
 
-        static const int minimumTableSize = 64;
+        // The starting table size. Can be overridden when we know beforehand that
+        // a hash table will have at least N entries.
+        static const int minimumTableSize = 8;
     };
 
     // Default integer traits disallow both 0 and -1 as keys (max value instead of -1 for unsigned).
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to