OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This benchmark is based on the six-speed benchmark build output. |
| 6 // Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/> |
| 7 |
| 8 load('../../base.js'); |
| 9 |
| 10 new BenchmarkSuite('ES5', [1000], [ |
| 11 new Benchmark('ES5', false, false, 0, ES5), |
| 12 ]); |
| 13 |
| 14 function Point(x, y) { |
| 15 this.x = x; |
| 16 this.y = y; |
| 17 } |
| 18 |
| 19 function MyPoint() { |
| 20 Point.apply(this, arguments); |
| 21 } |
| 22 |
| 23 function makePoint(x, y) { |
| 24 return new MyPoint(x, y); |
| 25 } |
| 26 |
| 27 function ES5() { |
| 28 'use strict'; |
| 29 return makePoint(1, 2); |
| 30 } |
| 31 |
| 32 load('run.js'); |
OLD | NEW |