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

Side by Side Diff: runtime/vm/benchmark_test.cc

Issue 10693034: Increase the iteration count for the UseDartApi benchmark. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | 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) 2012, 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 #include "vm/benchmark_test.h" 5 #include "vm/benchmark_test.h"
6 6
7 #include "bin/file.h" 7 #include "bin/file.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 EXPECT(!Dart_IsError(result)); 140 EXPECT(!Dart_IsError(result));
141 if (strcmp(cstr, "init") == 0) { 141 if (strcmp(cstr, "init") == 0) {
142 return InitNativeFields; 142 return InitNativeFields;
143 } else { 143 } else {
144 return UseDartApi; 144 return UseDartApi;
145 } 145 }
146 } 146 }
147 147
148 148
149 BENCHMARK(UseDartApi) { 149 BENCHMARK(UseDartApi) {
150 const int kNumIterations = 100000; 150 const int kNumIterations = 1000000;
151 const char* kScriptChars = 151 const char* kScriptChars =
152 "class Class extends NativeFieldsWrapper{\n" 152 "class Class extends NativeFieldsWrapper{\n"
153 " int init() native 'init';\n" 153 " int init() native 'init';\n"
154 " int method(int param1, int param2) native 'method';\n" 154 " int method(int param1, int param2) native 'method';\n"
155 "}\n" 155 "}\n"
156 "\n" 156 "\n"
157 "void benchmark(int count) {\n" 157 "void benchmark(int count) {\n"
158 " Class c = new Class();\n" 158 " Class c = new Class();\n"
159 " c.init();\n" 159 " c.init();\n"
160 " for (int i = 0; i < count; i++) {\n" 160 " for (int i = 0; i < count; i++) {\n"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 reinterpret_cast<Dart_NativeEntryResolver>(StackFrameNativeResolver)); 336 reinterpret_cast<Dart_NativeEntryResolver>(StackFrameNativeResolver));
337 Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("StackFrameTest")); 337 Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("StackFrameTest"));
338 Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL); 338 Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL);
339 EXPECT_VALID(result); 339 EXPECT_VALID(result);
340 int64_t elapsed_time = 0; 340 int64_t elapsed_time = 0;
341 EXPECT(!Dart_IsError(Dart_IntegerToInt64(result, &elapsed_time))); 341 EXPECT(!Dart_IsError(Dart_IntegerToInt64(result, &elapsed_time)));
342 benchmark->set_score(elapsed_time); 342 benchmark->set_score(elapsed_time);
343 } 343 }
344 344
345 } // namespace dart 345 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698