v8/test/js-perf-test/SixSpeed/classes/es5.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

21 lines
506 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('ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
function C() {
this.foo = 'bar';
}
C.prototype.bar = function() {};
function ES5() {
return new C();
};