Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 // VMOptions=--new_gen_heap_size=1 --no_inline_alloc | |
| 5 | |
| 6 // Regression test for slow-path allocation in the allocation stub. | |
|
regis
2014/02/18 03:27:43
Technically speaking, --slow_path is not synonym w
Florian Schneider
2014/02/18 09:58:11
I'm using --no-inline-alloc here. We should have a
| |
| 7 | |
| 8 library map_test; | |
| 9 import 'dart:collection'; | |
| 10 | |
| 11 void testCollection(var collection, n) { | |
| 12 for (int i = 0; i < n; i++) { | |
| 13 if (i % 1000 == 0) print(i); | |
| 14 collection.add(i); | |
| 15 } | |
| 16 } | |
| 17 | |
| 18 main() { | |
| 19 const int N = 100000; | |
| 20 testCollection(new LinkedHashSet(), N); | |
| 21 } | |
| OLD | NEW |