Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: da22966f8e5eb32c035454a25df1fd6f8b52c122
      
https://github.com/WebKit/WebKit/commit/da22966f8e5eb32c035454a25df1fd6f8b52c122
  Author: Yusuke Suzuki <[email protected]>
  Date:   2022-12-05 (Mon, 05 Dec 2022)

  Changed paths:
    M Source/JavaScriptCore/runtime/ObjectConstructor.cpp

  Log Message:
  -----------
  [JSC] Use getIfPropertyExists instead of hasProperty+get
https://bugs.webkit.org/show_bug.cgi?id=248756
rdar://102973977

Reviewed by Ross Kirsling and Justin Michaud.

hasProperty+get should be done separately since this two operations are 
observable (e.g. Proxy will see them differently).
But for most of objects, they can be done by one getPropertySlot. 
JSObject::getIfPropertyExists can handle this case and
automatically does efficient hasProperty+get combination. We should use it for 
toPropertyDescriptor.

                                                      ToT                     
Patched

    redefine-property-accessor-dictionary        6.6732+-0.0235     ^      
6.1863+-0.0115        ^ definitely 1.0787x faster
    redefine-property-previous-attributes       64.1454+-0.0491     ^     
52.8705+-0.4305        ^ definitely 1.2133x faster
    redefine-property-data-dictionary            5.4420+-0.0105     ^      
5.2991+-0.0157        ^ definitely 1.0270x faster
    redefine-property-data                       4.5836+-0.0124     ^      
4.4179+-0.0101        ^ definitely 1.0375x faster
    redefine-property-accessor                   5.8084+-0.0248     ^      
5.2639+-0.0125        ^ definitely 1.1034x faster

* Source/JavaScriptCore/runtime/ObjectConstructor.cpp:
(JSC::toPropertyDescriptor):

Canonical link: https://commits.webkit.org/257392@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to