Commit 960c2a1f authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Revert "Resize identity map by doubling instead of quadrupling."

This reverts commit 3d82e557.

Reason for revert: gc stress failures, e.g. https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/9729/steps/Mjsunit%20%28flakes%29/logs/regress-crbug-647217

Original change's description:
> Resize identity map by doubling instead of quadrupling.
> 
> Perf-sheriffs please revert if this causes any performance regressions.
> 
> BUG=
> 
> Change-Id: I9ead7148e1e0146ece3614df49fd031dd1e357fe
> Reviewed-on: https://chromium-review.googlesource.com/445159
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44143}

TBR=rmcilroy@chromium.org,titzer@chromium.org,jochen@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Change-Id: I96cc0e2ca225b9a76eaaf604cd240e71176736ba
Reviewed-on: https://chromium-review.googlesource.com/459513Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44146}
parent e63070e9
......@@ -11,7 +11,7 @@ namespace v8 {
namespace internal {
static const int kInitialIdentityMapSize = 4;
static const int kResizeFactor = 2;
static const int kResizeFactor = 4;
IdentityMapBase::~IdentityMapBase() {
// Clear must be called by the subclass to avoid calling the virtual
......@@ -86,8 +86,7 @@ void* IdentityMapBase::DeleteIndex(int index) {
size_--;
DCHECK_GE(size_, 0);
if (capacity_ > kInitialIdentityMapSize &&
size_ * kResizeFactor < capacity_ / kResizeFactor) {
if (size_ * kResizeFactor < capacity_ / kResizeFactor) {
Resize(capacity_ / kResizeFactor);
return ret_value; // No need to fix collisions as resize reinserts keys.
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment