Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/pkg/angular/perf/loop_perf.dart

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/perf/lexer_perf.dart ('k') | third_party/pkg/angular/perf/mirror_perf.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/angular/perf/loop_perf.dart
diff --git a/third_party/pkg/angular/perf/loop_perf.dart b/third_party/pkg/angular/perf/loop_perf.dart
deleted file mode 100644
index 819daf45583af725cc4f9c28cec24096d549c4f3..0000000000000000000000000000000000000000
--- a/third_party/pkg/angular/perf/loop_perf.dart
+++ /dev/null
@@ -1,71 +0,0 @@
-library loop_perf;
-
-import 'package:benchmark_harness/benchmark_harness.dart';
-
-class IterationBenchmark extends BenchmarkBase {
- List<int> list = new List.generate(1000, (i) => i);
- Map map;
- var r = 0;
- IterationBenchmark(name) : super(name) {
- map = new Map.fromIterable(list, key: (i) => i, value: (i) => i);
- }
-}
-
-class ForEach extends IterationBenchmark {
- ForEach() : super('forEach');
- run() {
- var count = 0;
- list.forEach((int i) => count = count + i);
- return count;
- }
-}
-
-class ForEachMap extends IterationBenchmark {
- ForEachMap() : super('forEachMap');
- run() {
- var count = 0;
- map.forEach((int k, int v) => count = count + k + v);
- return count;
- }
-}
-
-class ForIn extends IterationBenchmark {
- ForIn() : super('for in');
- run() {
- var count = 0;
- for(int item in list) {
- count = count + item;
- }
- return count;
- }
-}
-
-class ForInMap extends IterationBenchmark {
- ForInMap() : super('for in Map');
- run() {
- var count = 0;
- for(int key in map.keys) {
- count = count + key + map[key];
- }
- return count;
- }
-}
-
-class ForLoop extends IterationBenchmark {
- ForLoop() : super('for loop');
- run() {
- int count = 0;
- for(int i = 0; i < list.length; i++) {
- count += list[i];
- }
- return count;
- }
-}
-
-void main() {
- new ForEach().report();
- new ForIn().report();
- new ForLoop().report();
- new ForEachMap().report();
- new ForInMap().report();
-}
« no previous file with comments | « third_party/pkg/angular/perf/lexer_perf.dart ('k') | third_party/pkg/angular/perf/mirror_perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698