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

Side by Side Diff: frog/leg/scanner/scanner_bench.dart

Issue 9254026: Split dart:builtin into dart:builtin and dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment and add binaries. Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/file_system_vm.dart ('k') | frog/leg/scanner/vm_scanner_bench.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('scanner_bench'); 5 #library('scanner_bench');
6 #import('scannerlib.dart'); 6 #import('scannerlib.dart');
7 #import('scanner_implementation.dart'); 7 #import('scanner_implementation.dart');
8 #source('source_list.dart'); 8 #source('source_list.dart');
9 9
10 /** 10 /**
11 * A common superclass for scanner benchmarks. 11 * A common superclass for scanner benchmarks.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 int score() { 118 int score() {
119 num geoMean = 1; 119 num geoMean = 1;
120 int count = Math.min(scores.length, GEOMEAN_COUNT); 120 int count = Math.min(scores.length, GEOMEAN_COUNT);
121 for (int i = scores.length - count; i < scores.length; i++) { 121 for (int i = scores.length - count; i < scores.length; i++) {
122 geoMean *= scores[i]; 122 geoMean *= scores[i];
123 } 123 }
124 geoMean = Math.pow(geoMean, 1/Math.max(count, 1)); 124 geoMean = Math.pow(geoMean, 1/Math.max(count, 1));
125 return geoMean.round().toInt(); 125 return geoMean.round().toInt();
126 } 126 }
127 } 127 }
OLDNEW
« no previous file with comments | « frog/file_system_vm.dart ('k') | frog/leg/scanner/vm_scanner_bench.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698