f31e80548c
Add array pattern destructuring micro-benchmarks. These benchmarks compare a naive ES5 immplementation to an ES6-style implementation that uses destructuring. Adapted from http://kpdecker.github.io/six-speed BUG=v8:5267 Review-Url: https://codereview.chromium.org/2513273002 Cr-Commit-Position: refs/heads/master@{#41126}
26 lines
615 B
JavaScript
26 lines
615 B
JavaScript
// Copyright 2016 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('array_destructuring.js');
|
|
|
|
var success = true;
|
|
|
|
function PrintResult(name, result) {
|
|
print(name + '(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 });
|