Commit 88df7dca authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[Test] Add TypedArray constructor benchmarks.

Add a simple benchmark for a TypedArray constructor. Run once with the
default pipeline and once with turbofan so that we can compare the
performance.

Also fixes a typo in the Regex for the result of the CopyWithin
benchmark which stopped the results showing up in the perf
dashboard.

BUG=

Change-Id: Ic2eb0bd1e02b458c1163e97130abd0e7531c2e1c
Reviewed-on: https://chromium-review.googlesource.com/440225Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43087}
parent 82e43bfe
......@@ -278,13 +278,25 @@
{
"name": "TypedArrays",
"path": ["TypedArrays"],
"main": "run.js",
"resources": [
"typedarrays.js"
],
"results_regexp": "^TypedArrays\\-%s\\(Scope\\): (.+)$",
"results_regexp": "^TypedArrays\\-%s\\(Score\\): (.+)$",
"tests": [
{"name": "CopyWithin"}
{
"name": "CopyWithin",
"main": "run.js",
"test_flags": ["typedarrays"]
},
{
"name": "Constructor",
"main": "run.js",
"test_flags": ["constructor"]
},
{
"name": "Constructor--Future",
"flags": ["--future"],
"results_regexp": "^TypedArrays\\-Constructor\\(Score\\): (.+)$",
"main": "run.js",
"test_flags": ["constructor"]
}
]
}
]
......
// 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.
new BenchmarkSuite('Constructor', [1000], [
new Benchmark('Constructor', false, false, 0, constructor),
]);
function constructor() {
new Int32Array(16);
}
......@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../base.js');
load('typedarrays.js');
load(arguments[0] + '.js');
var success = true;
......@@ -13,7 +11,6 @@ function PrintResult(name, result) {
print(`TypedArrays-${name}(Score): ${result}`);
}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
......
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