Commit 6b629ef7 authored by cbruni's avatar cbruni Committed by Commit bot

KeyAccumulator: tweaking parameters for benchmarks

R=ishell@chromium.org
BUG=chromium:536790
LOG=N

Review URL: https://codereview.chromium.org/1375913002

Cr-Commit-Position: refs/heads/master@{#31039}
parent ed906a91
......@@ -6789,8 +6789,10 @@ void KeyAccumulator::PrepareForComparisons(int count) {
// hash-table-based checks which have a one-time overhead for
// initializing but O(1) for HasKey checks.
if (!set_.is_null()) return;
// This limit was obtained through evaluation of a microbench.
if (length_ * count < 50) return;
// These limits were obtained through evaluation of several microbenchmarks.
if (length_ * count < 100) return;
// Don't use a set for few elements
if (length_ < 100 && count < 20) return;
set_ = OrderedHashSet::Allocate(isolate_, length_);
for (int i = 0; i < length_; i++) {
Handle<Object> value(keys_->get(i), isolate_);
......
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