v8/test/js-perf-test/ForLoops/run.js
Caitlin Potter e2670e80a5 [js-perf-test] add microbenchmarks for C-style for loops
Adds some benchmarks copied from v8:4762.

BUG=v8:4762, v8:5460
R=adamk@chromium.org

Change-Id: I0b96080042781c2c46c0c8a3896a921bde97c1e5
Reviewed-on: https://chromium-review.googlesource.com/475934
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#44629}
2017-04-12 21:56:43 +00:00

26 lines
609 B
JavaScript

// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../base.js');
load('for_loop.js');
var success = true;
function PrintResult(name, result) {
print(name + '-ForLoop(Score): ' + result);
}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError });