[webkit-changes] [WebKit/WebKit] 05c634: [JSC] Skip ProxyObject's trap result validation in...
Commit Queue
noreply at github.com
Wed May 3 15:33:05 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 05c634fc9b5a2fe04c30aaa1dcd06e1639fee341
https://github.com/WebKit/WebKit/commit/05c634fc9b5a2fe04c30aaa1dcd06e1639fee341
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-05-03 (Wed, 03 May 2023)
Changed paths:
A JSTests/microbenchmarks/proxy-defineproperty.js
A JSTests/microbenchmarks/proxy-delete.js
A JSTests/microbenchmarks/proxy-gopd.js
M Source/JavaScriptCore/runtime/ProxyObject.cpp
Log Message:
-----------
[JSC] Skip ProxyObject's trap result validation in the common case (C++ code)
https://bugs.webkit.org/show_bug.cgi?id=256213
<rdar://problem/108795682>
Reviewed by Yusuke Suzuki.
This change leverages Structure flags introduced in https://webkit.org/b/255661 to be used in C++
ProxyObject code, slightly speeding up (6-13%) the following traps in the common case of [[ProxyTarget]]
being an ordinary extensible object without non-configurable properties:
* "has", "get", "set" before the IC kicks in (if any),
* "defineProperty",
* "deleteProperty" returning `true`,
* "getOwnPropertyDescriptor" returning `undefined`.
In a follow-up, most likely we can do a little better with "getOwnPropertyDescriptor" trap by
leveraging known descriptor structures since toPropertyDescriptor() is the bottleneck of this trap.
ToT patch
proxy-defineproperty 105.9173+-0.2895 ^ 100.1405+-0.3956 ^ definitely 1.0577x faster
proxy-delete 71.9609+-0.5476 ^ 67.1882+-0.4754 ^ definitely 1.0710x faster
proxy-get 560.3030+-2.0679 ^ 503.2683+-1.7229 ^ definitely 1.1133x faster
proxy-gopd 85.5031+-0.3219 ^ 80.2407+-0.3543 ^ definitely 1.0656x faster
proxy-has-miss 53.7071+-0.2929 ^ 48.3547+-0.2941 ^ definitely 1.1107x faster
proxy-set 53.9783+-0.3207 ^ 47.6111+-0.1005 ^ definitely 1.1337x faster
* JSTests/microbenchmarks/proxy-defineproperty.js: Added.
* JSTests/microbenchmarks/proxy-delete.js: Added.
* JSTests/microbenchmarks/proxy-gopd.js: Added.
* Source/JavaScriptCore/runtime/ProxyObject.cpp:
(JSC::performProxyGet):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::performPut):
(JSC::ProxyObject::performDelete):
(JSC::ProxyObject::performDefineOwnProperty):
Canonical link: https://commits.webkit.org/263653@main
More information about the webkit-changes
mailing list