Intent to... Refactor [[GetOwnPropertyDescriptor]]

57 views
Skip to first unread message

Caitlin Potter

unread,
Oct 19, 2022, 1:17:42 PM10/19/22
to v8-...@googlegroups.com
Hi friends, it’s been a while.

At some point in the past 2 years, I had communicated an intent to do some work on improving Proxy [[GetOwnPropertyDescriptor]] performance, and mentioned in passing a plan to implement a CSA builtin in lieu of crossing into C++, then back into JS, and then in the case of a customer application, virtually 100% of the time, back into another Proxy operation and back into JS once again, so during startup, this overhead adds up a lot.

So, at this point, I’d like to try to upstream a change to avoid a lot of this overhead (and introduce a little bit of new overhead, more about that in a moment). I’ve prepared a design document at https://docs.google.com/document/d/1ii17O_rioObCrxv_5kvy-SxPc7I2R84CsYV3S1wzWY8/edit?usp=sharing which covers it, but it’s pretty straight forward:

- Proxy [[GetOwnPropertyDescriptor]] happens entirely within JS/codestub linkage, without jumping into C++
- Dispatching to different flavours of [[GetOwnPropertyDescriptor]] is done in a new dispatcher codestub, which is slightly more overhead in the common cases — however this doesn’t seem to make a difference on the industry standard benchmarks we’ve tried (admittedly, just Jetstream 2.0, which doesn’t actually use a lot of GOPD, as far as I can tell)

This change would increase code size and complexity, and not necessarily result in significant benefits for most applications, but this is a big deal for stuff making significant use of the membrane design pattern.
Reply all
Reply to author
Forward
0 new messages