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

Issue 21562002: Improve performance of Dart_ListGetAsBytes. (Closed)

Created:
7 years, 4 months ago by Florian Schneider
Modified:
7 years, 4 months ago
Reviewers:
ricow1, siva, Ivan Posva
CC:
reviews_dartlang.org, kustermann, vm-dev_dartlang.org, ricow1
Visibility:
Public.

Description

Improve performance of Dart_ListGetAsBytes. This fixes two performance issues with Dart_ListGetAsBytes: 1. Avoid excessive handle allocation when copying from a generic List. 2. Add a fast path when copying from byte-size typed data view objects. The old version only supported typed data, but no views. R=asiva@google.com Committed: https://code.google.com/p/dart/source/detail?r=25731

Patch Set 1 #

Total comments: 9

Patch Set 2 : addressed comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -8 lines) Patch
M runtime/vm/dart_api_impl.cc View 1 3 chunks +40 lines, -7 lines 2 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 1 chunk +33 lines, -0 lines 0 comments Download
M runtime/vm/dart_entry.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Florian Schneider
7 years, 4 months ago (2013-08-01 14:45:33 UTC) #1
siva
lgtm https://codereview.chromium.org/21562002/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/21562002/diff/1/runtime/vm/dart_api_impl.cc#newcode2179 runtime/vm/dart_api_impl.cc:2179: Smi::Value(TypedDataView::OffsetInBytes(view)) + offset; This data_offset computation can be ...
7 years, 4 months ago (2013-08-01 16:29:31 UTC) #2
ricow1
DBC https://codereview.chromium.org/21562002/diff/1/runtime/vm/dart_api_impl_test.cc File runtime/vm/dart_api_impl_test.cc (right): https://codereview.chromium.org/21562002/diff/1/runtime/vm/dart_api_impl_test.cc#newcode840 runtime/vm/dart_api_impl_test.cc:840: "List main(int size) {" add \n here and ...
7 years, 4 months ago (2013-08-01 16:29:49 UTC) #3
Florian Schneider
https://codereview.chromium.org/21562002/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/21562002/diff/1/runtime/vm/dart_api_impl.cc#newcode2179 runtime/vm/dart_api_impl.cc:2179: Smi::Value(TypedDataView::OffsetInBytes(view)) + offset; On 2013/08/01 16:29:31, siva wrote: > ...
7 years, 4 months ago (2013-08-02 11:07:33 UTC) #4
Florian Schneider
Committed patchset #2 manually as r25731 (presubmit successful).
7 years, 4 months ago (2013-08-02 11:32:10 UTC) #5
Ivan Posva
https://codereview.chromium.org/21562002/diff/9001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/21562002/diff/9001/runtime/vm/dart_api_impl.cc#newcode2179 runtime/vm/dart_api_impl.cc:2179: if (data.IsTypedData()) { How can this ever not be ...
7 years, 4 months ago (2013-08-05 03:45:00 UTC) #6
Florian Schneider
7 years, 4 months ago (2013-08-05 08:38:09 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/21562002/diff/9001/runtime/vm/dart_api_impl.cc
File runtime/vm/dart_api_impl.cc (right):

https://codereview.chromium.org/21562002/diff/9001/runtime/vm/dart_api_impl.c...
runtime/vm/dart_api_impl.cc:2179: if (data.IsTypedData()) {
On 2013/08/05 03:45:00, Ivan Posva wrote:
> How can this ever not be a typed data? I would expect this to be converted to
an
> ASSERT, no?

Not sure: the view constructor takes just a ByteBuffer argument, so the view can
be on anything implementing that interface.

Powered by Google App Engine
This is Rietveld 408576698