Commit bc6b87cf authored by petermarshall's avatar petermarshall Committed by Commit bot

[Test] Add SixSpeed tests for spread literals.

This will give us a baseline for upcoming perf work.

BUG=v8:5940

Review-Url: https://codereview.chromium.org/2680763002
Cr-Commit-Position: refs/heads/master@{#42987}
parent 009e8b11
...@@ -104,6 +104,29 @@ ...@@ -104,6 +104,29 @@
"test_flags": ["super_spread/es6"] "test_flags": ["super_spread/es6"]
} }
] ]
},
{
"name": "SpreadLiteral",
"path": ["SixSpeed"],
"flags": ["--future"],
"results_regexp": "^%s\\(Score\\): (.+)$",
"tests": [
{
"name": "ES5",
"main": "run.js",
"test_flags": ["spread_literal/es5"]
},
{
"name": "Babel",
"main": "run.js",
"test_flags": ["super_spread/babel"]
},
{
"name": "ES6",
"main": "run.js",
"test_flags": ["spread_literal/es6"]
}
]
} }
] ]
} }
// 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('Babel', [1000], [
new Benchmark('Babel', false, false, 0, Babel),
]);
function Babel() {
return [1].concat([1, 2, 3]);
}
// 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
function ES5() {
var ret = [1];
ret.push(1, 2, 3);
return ret;
}
// 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6),
]);
function ES6() {
return [1, ... [1, 2, 3]];
}
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