OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This benchmark is based on the six-speed benchmark build output. | 5 // This benchmark is based on the six-speed benchmark build output. |
6 // Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/> | 6 // Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/> |
7 | 7 |
8 new BenchmarkSuite('SuperSpread-ES5', [1000], [ | 8 new BenchmarkSuite('SuperSpread-ES5', [1000], [ |
9 new Benchmark('ES5', false, false, 0, ES5), | 9 new Benchmark('ES5', true, true, 150000, ES5), |
10 ]); | 10 ]); |
11 | 11 |
12 new BenchmarkSuite('SuperSpread-Babel', [1000], [ | 12 new BenchmarkSuite('SuperSpread-Babel', [1000], [ |
13 new Benchmark('Babel', false, false, 0, Babel), | 13 new Benchmark('Babel', true, true, 150000, Babel), |
14 ]); | 14 ]); |
15 | 15 |
16 new BenchmarkSuite('SuperSpread-ES6', [1000], [ | 16 new BenchmarkSuite('SuperSpread-ES6', [1000], [ |
17 new Benchmark('ES6', false, false, 0, ES6), | 17 new Benchmark('ES6', true, true, 150000, ES6), |
18 ]); | 18 ]); |
19 | 19 |
20 // ---------------------------------------------------------------------------- | 20 // ---------------------------------------------------------------------------- |
21 // Benchmark: ES5 | 21 // Benchmark: ES5 |
22 // ---------------------------------------------------------------------------- | 22 // ---------------------------------------------------------------------------- |
23 | 23 |
24 function ES5() { | 24 function ES5() { |
25 'use strict'; | 25 'use strict'; |
26 | 26 |
27 function Point(x, y) { | 27 function Point(x, y) { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 class MyPoint extends Point {} | 126 class MyPoint extends Point {} |
127 | 127 |
128 function makePoint(x, y) { | 128 function makePoint(x, y) { |
129 return new MyPoint(x, y); | 129 return new MyPoint(x, y); |
130 } | 130 } |
131 | 131 |
132 return makePoint(1, 2); | 132 return makePoint(1, 2); |
133 } | 133 } |
OLD | NEW |