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

Issue 1751643003: [esnext] use map instance_descriptors() when possible in Object.values/entries() (Closed)

Created:
4 years, 9 months ago by caitp (gmail)
Modified:
4 years, 9 months ago
CC:
v8-reviews_googlegroups.com, wingo
Base URL:
https://chromium.googlesource.com/v8/v8.git@ObjectValuesEntriesPerf
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[esnext] use map instance_descriptors() when possible in Object.values/entries() When possible (non-Proxy receiver, expecting only String-names), walk the instance_descriptors() array rather than performing [[OwnPropertyKeys]]. If the map changes during a call to an accessor property, resort to a slower property lookup. For now, the fast path is not taken if the object contains any element keys. Offers a measurable improvement over the existing version, in select situations. BUG=v8:4663 LOG=N R=cbruni@chromium.org, verwaest@chromium.org, adamk@chromium.org Committed: https://crrev.com/cee0dca2b9c52e83a6b1ab368662f7029b480d20 Cr-Commit-Position: refs/heads/master@{#34567}

Patch Set 1 #

Total comments: 7

Patch Set 2 : cleanup #

Patch Set 3 : trial: generate enum cache when possible, too #

Total comments: 6

Patch Set 4 : Make it more like FastAssign() in builtins.cc #

Total comments: 3

Patch Set 5 : Oops, don't include Symbols in the fast case #

Patch Set 6 : Trial: handle elements even in "fast" case, in order to still take advantage? #

Total comments: 9

Patch Set 7 : rebased #

Patch Set 8 : remove GetOwnElementValuesOrEntries #

Patch Set 9 : fix tiny bug #

Total comments: 1

Patch Set 10 : remove unused stuff from patch set 6 + address cbruni's variable name nit #

Patch Set 11 : remove redundant IsJSObject() check #

Patch Set 12 : make Handle<> typechecks happy with the IsJSObject() removed #

Patch Set 13 : re-fix above commit to actually be able to build >:| #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -2 lines) Patch
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +84 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 50 (21 generated)
caitp (gmail)
A little bit of perf tuning for some (I imagine) common cases. It provides a ...
4 years, 9 months ago (2016-03-01 18:30:22 UTC) #1
caitp (gmail)
On 2016/03/01 18:30:22, caitp wrote: > A little bit of perf tuning for some (I ...
4 years, 9 months ago (2016-03-01 18:40:32 UTC) #2
Camillo Bruni
https://codereview.chromium.org/1751643003/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/1/src/objects.cc#newcode8856 src/objects.cc:8856: did_use_enum_cache = true; I've got a long-term project running ...
4 years, 9 months ago (2016-03-01 20:50:14 UTC) #3
caitp (gmail)
thanks for the look! https://codereview.chromium.org/1751643003/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/1/src/objects.cc#newcode8856 src/objects.cc:8856: did_use_enum_cache = true; On 2016/03/01 ...
4 years, 9 months ago (2016-03-01 21:02:40 UTC) #4
caitp (gmail)
https://codereview.chromium.org/1751643003/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/1/src/objects.cc#newcode8876 src/objects.cc:8876: object->map()->EnumLength() == kInvalidEnumCacheSentinel)) { On 2016/03/01 21:02:40, caitp wrote: ...
4 years, 9 months ago (2016-03-01 21:12:25 UTC) #5
Camillo Bruni
https://codereview.chromium.org/1751643003/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/1/src/objects.cc#newcode8856 src/objects.cc:8856: did_use_enum_cache = true; On 2016/03/01 at 21:02:40, caitp wrote: ...
4 years, 9 months ago (2016-03-02 09:21:51 UTC) #6
caitp (gmail)
https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc#newcode8894 src/objects.cc:8894: object->map()->EnumLength() == kInvalidEnumCacheSentinel) { On 2016/03/02 09:21:51, cbruni wrote: ...
4 years, 9 months ago (2016-03-02 11:53:21 UTC) #7
Camillo Bruni
https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc#newcode8894 src/objects.cc:8894: object->map()->EnumLength() == kInvalidEnumCacheSentinel) { On 2016/03/02 at 11:53:21, caitp ...
4 years, 9 months ago (2016-03-02 17:50:07 UTC) #8
caitp (gmail)
https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc#newcode8894 src/objects.cc:8894: object->map()->EnumLength() == kInvalidEnumCacheSentinel) { On 2016/03/02 17:50:07, cbruni wrote: ...
4 years, 9 months ago (2016-03-02 18:17:28 UTC) #9
caitp (gmail)
On 2016/03/02 18:17:28, caitp wrote: > https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc > File src/objects.cc (right): > > https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc#newcode8894 > ...
4 years, 9 months ago (2016-03-02 19:24:31 UTC) #10
caitp (gmail)
On 2016/03/02 19:24:31, caitp wrote: > On 2016/03/02 18:17:28, caitp wrote: > > https://codereview.chromium.org/1751643003/diff/40001/src/objects.cc > ...
4 years, 9 months ago (2016-03-03 04:12:59 UTC) #11
caitp (gmail)
On 2016/03/03 04:12:59, caitp wrote: > Last patchset is a trial to see if some ...
4 years, 9 months ago (2016-03-03 17:49:14 UTC) #12
Camillo Bruni
I'm fine with patch 4 and maybe postpone further optimizations to follow-up CLs. https://codereview.chromium.org/1751643003/diff/60001/src/objects.cc File ...
4 years, 9 months ago (2016-03-04 09:40:25 UTC) #16
caitp (gmail)
https://codereview.chromium.org/1751643003/diff/60001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/60001/src/objects.cc#newcode8860 src/objects.cc:8860: Handle<Object> prop_value; On 2016/03/04 09:40:25, cbruni wrote: > Have ...
4 years, 9 months ago (2016-03-04 14:03:04 UTC) #17
caitp (gmail)
Thanks --- I've just gone ahead and removed the elements handling for now, but it ...
4 years, 9 months ago (2016-03-04 16:34:33 UTC) #18
Camillo Bruni
lgtm https://codereview.chromium.org/1751643003/diff/100001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/100001/src/objects.cc#newcode8873 src/objects.cc:8873: if (!next_key->IsName()) { On 2016/03/04 at 16:34:33, caitp ...
4 years, 9 months ago (2016-03-04 17:23:27 UTC) #19
commit-bot: I haz the power
This CL has an open dependency (Issue 1746383003 Patch 120001). Please resolve the dependency and ...
4 years, 9 months ago (2016-03-04 19:25:22 UTC) #23
caitp (gmail)
On 2016/03/04 19:25:22, commit-bot: I haz the power wrote: > This CL has an open ...
4 years, 9 months ago (2016-03-04 19:25:58 UTC) #24
caitp (gmail)
Ping Adam or Dan: can you sign off (or add another runtime person to sign ...
4 years, 9 months ago (2016-03-07 22:07:14 UTC) #28
adamk
I'm going to punt to verwaest@, a runtime person who's also been doing a lot ...
4 years, 9 months ago (2016-03-07 22:21:59 UTC) #30
Toon Verwaest
lgtm https://codereview.chromium.org/1751643003/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1751643003/diff/160001/src/objects.cc#newcode8859 src/objects.cc:8859: if (filter == ENUMERABLE_STRINGS && object->IsJSObject()) { You ...
4 years, 9 months ago (2016-03-07 22:39:34 UTC) #31
caitp (gmail)
On 2016/03/07 22:39:34, Toon Verwaest wrote: > lgtm > > https://codereview.chromium.org/1751643003/diff/160001/src/objects.cc > File src/objects.cc (right): ...
4 years, 9 months ago (2016-03-07 23:22:13 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1751643003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1751643003/200001
4 years, 9 months ago (2016-03-07 23:22:43 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_dbg_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng/builds/2496) v8_linux_dbg_ng_triggered on tryserver.v8 (JOB_FAILED, ...
4 years, 9 months ago (2016-03-07 23:50:32 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1751643003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1751643003/220001
4 years, 9 months ago (2016-03-07 23:54:51 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/11211) v8_linux_arm64_rel on tryserver.v8 (JOB_FAILED, ...
4 years, 9 months ago (2016-03-07 23:56:48 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1751643003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1751643003/240001
4 years, 9 months ago (2016-03-08 00:09:30 UTC) #46
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 9 months ago (2016-03-08 00:29:40 UTC) #48
commit-bot: I haz the power
4 years, 9 months ago (2016-03-08 00:30:59 UTC) #50
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/cee0dca2b9c52e83a6b1ab368662f7029b480d20
Cr-Commit-Position: refs/heads/master@{#34567}

Powered by Google App Engine
This is Rietveld 408576698