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

Issue 144383007: Optimize getField by caching a closure generated from eval. (Closed)

Created:
6 years, 10 months ago by rmacnak
Modified:
6 years, 10 months ago
Reviewers:
hausner, kasperl, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org, kasperl
Visibility:
Public.

Description

Optimize getField by caching a closure generated from eval. R=iposva@google.com Committed: https://code.google.com/p/dart/source/detail?r=32343

Patch Set 1 #

Patch Set 2 : use a hash map instead #

Patch Set 3 : TODO weak #

Total comments: 8

Patch Set 4 : factor out slow path #

Patch Set 5 : avoid entries for MNU #

Total comments: 7

Patch Set 6 : address comments #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -0 lines) Patch
runtime/lib/mirrors.cc View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
runtime/lib/mirrors_impl.dart View 1 2 3 4 5 6 1 chunk +89 lines, -0 lines 0 comments Download
runtime/vm/bootstrap_natives.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
rmacnak
Baseline 4960 Eval 499 Specialized 482 Smaller is better. Eval https://codereview.chromium.org/144383007/ Specialized https://codereview.chromium.org/135913003/
6 years, 10 months ago (2014-02-03 19:25:09 UTC) #1
hausner
I like this version much better. Adding more function types and specialized parser entry points ...
6 years, 10 months ago (2014-02-04 00:12:23 UTC) #2
kasperl
Thanks a lot for working on this, Ryan! I have a few tweaks that would ...
6 years, 10 months ago (2014-02-04 07:37:22 UTC) #3
rmacnak
Use a non-identity hash map, and use the string behind the symbol as the key. ...
6 years, 10 months ago (2014-02-05 01:08:33 UTC) #4
kasperl
https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart File runtime/lib/mirrors_impl.dart (right): https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart#newcode341 runtime/lib/mirrors_impl.dart:341: if (f == null) { Consider splitting this method ...
6 years, 10 months ago (2014-02-05 08:32:13 UTC) #5
kasperl
https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart File runtime/lib/mirrors_impl.dart (right): https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart#newcode335 runtime/lib/mirrors_impl.dart:335: // TODO(16539): Make these weak. I guess there's no ...
6 years, 10 months ago (2014-02-05 08:34:26 UTC) #6
kasperl
https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart File runtime/lib/mirrors_impl.dart (right): https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart#newcode342 runtime/lib/mirrors_impl.dart:342: var unwrapped = _n(memberName); On 2014/02/05 08:32:13, kasperl wrote: ...
6 years, 10 months ago (2014-02-05 09:05:39 UTC) #7
rmacnak
Apply Kasper's advice. Also avoid generating closures for one-off getField calls. 248-255 => 183-197 https://codereview.chromium.org/144383007/diff/80001/runtime/lib/mirrors_impl.dart ...
6 years, 10 months ago (2014-02-05 18:53:41 UTC) #8
rmacnak
Maintain the call count on a per-selector basis. Only bump call count when the invocation ...
6 years, 10 months ago (2014-02-05 22:13:16 UTC) #9
Ivan Posva
LGTMwC -Ivan https://codereview.chromium.org/144383007/diff/210001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/144383007/diff/210001/runtime/lib/mirrors.cc#newcode1315 runtime/lib/mirrors.cc:1315: for (int i = 0; i < ...
6 years, 10 months ago (2014-02-05 22:23:44 UTC) #10
rmacnak
https://codereview.chromium.org/144383007/diff/210001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/144383007/diff/210001/runtime/lib/mirrors.cc#newcode1322 runtime/lib/mirrors.cc:1322: } On 2014/02/05 22:23:44, Ivan Posva wrote: > With ...
6 years, 10 months ago (2014-02-05 22:56:30 UTC) #11
rmacnak
6 years, 10 months ago (2014-02-05 23:03:51 UTC) #12
Message was sent while issue was closed.
Committed patchset #8 manually as r32343 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698