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

Issue 9979016: Add a unit test Benchmark_UseDartApi to measure dart api overhead. (Closed)

Created:
8 years, 8 months ago by turnidge
Modified:
8 years, 8 months ago
Reviewers:
Anton Muhin
CC:
reviews_dartlang.org, vm-dev_dartlang.org, siva
Visibility:
Public.

Description

Add a unit test Benchmark_UseDartApi to measure dart api overhead. Sample output: Benchmark_UseDartApi: 3.245700 us per iteration Committed: https://code.google.com/p/dart/source/detail?r=6189

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -0 lines) Patch
M runtime/vm/dart_api_impl.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 4 1 chunk +105 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
turnidge
8 years, 8 months ago (2012-04-04 18:08:41 UTC) #1
Anton Muhin
LGTM. You may want to address raised concerns though. https://chromiumcodereview.appspot.com/9979016/diff/1003/runtime/vm/dart_api_impl_test.cc File runtime/vm/dart_api_impl_test.cc (right): https://chromiumcodereview.appspot.com/9979016/diff/1003/runtime/vm/dart_api_impl_test.cc#newcode4767 runtime/vm/dart_api_impl_test.cc:4767: ...
8 years, 8 months ago (2012-04-04 18:12:36 UTC) #2
turnidge
8 years, 8 months ago (2012-04-04 19:40:22 UTC) #3
https://chromiumcodereview.appspot.com/9979016/diff/1003/runtime/vm/dart_api_...
File runtime/vm/dart_api_impl_test.cc (right):

https://chromiumcodereview.appspot.com/9979016/diff/1003/runtime/vm/dart_api_...
runtime/vm/dart_api_impl_test.cc:4767: Dart_Handle field_name =
Dart_NewString("field");
On 2012/04/04 18:12:36, antonmuhin wrote:
> this might be a separate issue.  and DOM bindings do not use direct field
lookup
> often.

Changed the benchmark to do native field access, to be more similar to DOM
bindings.

https://chromiumcodereview.appspot.com/9979016/diff/1003/runtime/vm/dart_api_...
runtime/vm/dart_api_impl_test.cc:4780: Dart_SetReturnValue(args,
Dart_NewInteger(value1 + value2));
On 2012/04/04 18:12:36, antonmuhin wrote:
> just in case: you may want to assert you always fit into Smi, otherwise you
may
> start to measure GC performance if a lot of heap ints are allocated.

Added some range checks for param, which should keep this in a Smi.

Powered by Google App Engine
This is Rietveld 408576698