Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: src/heap.h

Issue 9193015: Further robustify the keyed lookup cache against unlucky hash (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
===================================================================
--- src/heap.h (revision 10474)
+++ src/heap.h (working copy)
@@ -2135,11 +2135,11 @@
// Clear the cache.
void Clear();
- static const int kLength = 128;
+ static const int kLength = 256;
static const int kCapacityMask = kLength - 1;
static const int kMapHashShift = 5;
- static const int kHashMask = -2; // Zero the last bit.
- static const int kEntriesPerBucket = 2;
+ static const int kHashMask = -4; // Zero the last two bits.
+ static const int kEntriesPerBucket = 4;
Yang 2012/01/23 15:53:31 Maybe add assertions such as STATIC_ASSERT(IS_POWE
static const int kNotFound = -1;
private:
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698