Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c9740e5b2bb94d45875c64d3ee4da528f534aeea
      
https://github.com/WebKit/WebKit/commit/c9740e5b2bb94d45875c64d3ee4da528f534aeea
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-08-24 (Mon, 24 Aug 2026)

  Changed paths:
    A JSTests/microbenchmarks/object-rest-clone.js
    A JSTests/stress/object-rest-clone.js
    M Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

  Log Message:
  -----------
  [JSC] Use `objectCloneFast` for object rest destructuring in 
`@copyDataProperties`
https://bugs.webkit.org/show_bug.cgi?id=322374

Reviewed by Yusuke Suzuki.

Object rest destructuring (`const { ...rest } = object`) creates an empty 
object and
calls @copyDataProperties, which replays the source's shape one property at a 
time
via putOwnDataPropertyBatching even when nothing is excluded. This is the 
situation
319645@main fixed for Object.assign's batching path.

Try objectCloneFast before enumerating properties when the excluded set is 
empty.
The preconditions of the fast enumeration block already satisfy what 
objectCloneFast
requires, and a non-empty target fails its first check.

                                             Baseline                  Patched

object-rest-clone                         0.8409+-0.0355     ^      
0.5708+-0.0369        ^ definitely 1.4733x faster

Tests: JSTests/microbenchmarks/object-rest-clone.js
       JSTests/stress/object-rest-clone.js

* JSTests/microbenchmarks/object-rest-clone.js: Added.
* JSTests/stress/object-rest-clone.js: Added.
(shouldBe):
(shouldBeArray):
(makeState):
(restOnly):
(restParameter):
* Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to