| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 | 5 |
| 6 var MapBenchmark = new BenchmarkSuite('Map', [1000], [ | 6 var MapBenchmark = new BenchmarkSuite('Map', [1000], [ |
| 7 new Benchmark('Set', false, false, 0, MapSet), | 7 new Benchmark('Set', false, false, 0, MapSet), |
| 8 new Benchmark('Has', false, false, 0, MapHas, MapSetup, MapTearDown), | 8 new Benchmark('Has', false, false, 0, MapHas, MapSetup, MapTearDown), |
| 9 new Benchmark('Get', false, false, 0, MapGet, MapSetup, MapTearDown), | 9 new Benchmark('Get', false, false, 0, MapGet, MapSetup, MapTearDown), |
| 10 new Benchmark('Delete', false, false, 0, MapDelete, MapSetup, MapTearDown), | 10 new Benchmark('Delete', false, false, 0, MapDelete, MapSetup, MapTearDown), |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 | 73 |
| 74 | 74 |
| 75 function MapForEach() { | 75 function MapForEach() { |
| 76 map.forEach(function(v, k) { | 76 map.forEach(function(v, k) { |
| 77 if (v !== k) { | 77 if (v !== k) { |
| 78 throw new Error(); | 78 throw new Error(); |
| 79 } | 79 } |
| 80 }); | 80 }); |
| 81 } | 81 } |
| OLD | NEW |