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 new BenchmarkSuite('CopyWithin', [1000], [ | 5 new BenchmarkSuite('CopyWithin', [1000], [ |
6 new Benchmark('CopyWithin-Large', false, false, 0, | 6 new Benchmark('CopyWithin-Large', false, false, 0, |
7 CopyWithinLarge, CopyWithinLargeSetup, CopyWithinLargeTearDown), | 7 CopyWithinLarge, CopyWithinLargeSetup, CopyWithinLargeTearDown), |
8 ]); | 8 ]); |
9 | 9 |
10 var initialLargeFloat64Array = new Array(10000); | 10 var initialLargeFloat64Array = new Array(10000); |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 function CopyWithinLargeTearDown() { | 25 function CopyWithinLargeTearDown() { |
26 for (var i = 0; i < 5000; ++i) { | 26 for (var i = 0; i < 5000; ++i) { |
27 if (largeFloat64Array[i + 5000] !== i) { | 27 if (largeFloat64Array[i + 5000] !== i) { |
28 throw new TypeError("Unexpected result!\n" + largeFloat64Array); | 28 throw new TypeError("Unexpected result!\n" + largeFloat64Array); |
29 } | 29 } |
30 } | 30 } |
31 largeFloat64Array = void 0; | 31 largeFloat64Array = void 0; |
32 } | 32 } |
OLD | NEW |