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

Unified Diff: src/objects.cc

Issue 660373: - Changed the growth policy for hash tables to reduce the wasted memory.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 3993)
+++ src/objects.cc (working copy)
@@ -6945,9 +6945,9 @@
int nof = NumberOfElements() + n;
int nod = NumberOfDeletedElements();
// Return if:
- // 50% is still free after adding n elements and
+ // 25% is still free after adding n elements and
// at most 50% of the free elements are deleted elements.
- if ((nof + (nof >> 1) <= capacity) &&
+ if ((nof + (nof >> 2) <= capacity) &&
(nod <= (capacity - nof) >> 1)) return this;
Object* obj = Allocate(nof * 2);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698