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

Issue 856053002: Let Uint16List.setRange detect a String.codeUnits object, and copy directly from the string. (Closed)

Created:
5 years, 11 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Let Uint16List.setRange detect a String.codeUnits object, and copy directly from the string. R=vegorov@google.com Committed: https://code.google.com/p/dart/source/detail?r=43327

Patch Set 1 #

Patch Set 2 : Refactor, add more tests. #

Patch Set 3 : Move CodeUnits.cid to VM-only patch file. It makes no sense for dart2js #

Total comments: 6

Patch Set 4 : Address comments. Cleanup (inline _setStringAt) #

Total comments: 6

Patch Set 5 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -31 lines) Patch
M runtime/lib/internal_patch.dart View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/lib/string_patch.dart View 1 2 chunks +1 line, -15 lines 0 comments Download
M runtime/lib/typed_data.dart View 1 2 3 4 7 chunks +59 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/js_string.dart View 2 chunks +1 line, -14 lines 0 comments Download
M sdk/lib/internal/internal.dart View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M tests/standalone/typed_data_test.dart View 1 2 3 3 chunks +49 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Lasse Reichstein Nielsen
A simple benchmark that just does repeated: list.setRange(0, string.length, string.codeUnits); r = new String.fromCharCodes(list); improves ...
5 years, 10 months ago (2015-01-29 12:17:15 UTC) #2
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/856053002/diff/40001/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/856053002/diff/40001/runtime/lib/internal_patch.dart#newcode16 runtime/lib/internal_patch.dart:16: static final int cid = ClassID.getID(new CodeUnits("")); Maybe ...
5 years, 10 months ago (2015-01-29 13:04:54 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/856053002/diff/40001/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/856053002/diff/40001/runtime/lib/internal_patch.dart#newcode16 runtime/lib/internal_patch.dart:16: static final int cid = ClassID.getID(new CodeUnits("")); I think ...
5 years, 10 months ago (2015-01-29 13:13:28 UTC) #4
srdjan
DBC https://codereview.chromium.org/856053002/diff/60001/runtime/lib/typed_data.dart File runtime/lib/typed_data.dart (right): https://codereview.chromium.org/856053002/diff/60001/runtime/lib/typed_data.dart#newcode1061 runtime/lib/typed_data.dart:1061: if (ClassID.getID(iterable) != CodeUnits.cid) { Positive tests are ...
5 years, 10 months ago (2015-01-29 17:35:16 UTC) #6
sra1
Do we have a Golem benchmark that covers this? I'm curious where it would be ...
5 years, 10 months ago (2015-01-29 22:42:13 UTC) #8
Lasse Reichstein Nielsen
There are no current benchmarks that use this code. It's meant to address requests like ...
5 years, 10 months ago (2015-01-30 09:42:54 UTC) #9
Lasse Reichstein Nielsen
5 years, 10 months ago (2015-01-30 09:46:35 UTC) #10
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as 43327 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698