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

Issue 2746033006: dart2js: replace calls to codeUnitAt when index has favourable type (Closed)

Created:
3 years, 9 months ago by sra1
Modified:
3 years, 9 months ago
Reviewers:
Emily Fortuna
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: replace calls to codeUnitAt when index has favourable type If the index is known to be a non-negative integer, only a simple bounds check is required, so call a simpler version of codeUnitAt. In a large app, about 60% of calls meet this condition. Benchmarks do not show speedups, but that is because they are too simple so global type inference can usually tell that the index is not null, and often that it is always a non-negative integer, so the full version of codeUnitAt is optimized to look like the simple version. This does not happen in large apps. BUG= R=efortuna@google.com Committed: https://github.com/dart-lang/sdk/commit/e933720d88b6491998c6e94fa13cb1d2b9e547eb

Patch Set 1 #

Patch Set 2 : dartfmt #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -10 lines) Patch
M pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart View 1 4 chunks +14 lines, -10 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/js_string.dart View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
sra1
3 years, 9 months ago (2017-03-16 00:41:09 UTC) #3
Emily Fortuna
lgtm
3 years, 9 months ago (2017-03-16 01:04:29 UTC) #4
sra1
3 years, 9 months ago (2017-03-16 02:16:40 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
e933720d88b6491998c6e94fa13cb1d2b9e547eb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698