v8/test/js-perf-test/SixSpeed/classes/es6.js
bmeurer b161581947 [js-perf-tests] Add classes benchmarks from SixSpeed.
In particular the Babel generated code for simple constructors is
of interest here, since that's what we hit in the wild most often
currently.

BUG=v8:6275
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2822203004
Cr-Commit-Position: refs/heads/master@{#44719}
2017-04-19 11:23:48 +00:00

22 lines
501 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.
// 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),
]);
class C {
constructor() {
this.foo = 'bar';
}
bar() {}
}
function ES6() {
return new C();
}