Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7445b8e96e6bd57286af9089214d50c69e067f03
https://github.com/WebKit/WebKit/commit/7445b8e96e6bd57286af9089214d50c69e067f03
Author: Yusuke Suzuki <[email protected]>
Date: 2024-07-19 (Fri, 19 Jul 2024)
Changed paths:
A JSTests/microbenchmarks/clone-objects-via-spread-first.js
A JSTests/stress/spread-first.js
M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Log Message:
-----------
[JSC] Extend object-cloning fast path for spread
https://bugs.webkit.org/show_bug.cgi?id=276841
rdar://132116565
Reviewed by Yijia Huang.
If the object literal starts with the spread with simple properties like,
`{ ...object, value: 42 }`
we can start with object cloning and setting the rest of them to the result.
This improves the above simple pattern's performance by 5.8x.
ToT Patched
clone-objects-via-spread-first 102.5393+-3.7326 ^
17.5802+-0.1094 ^ definitely 5.8327x faster
* JSTests/microbenchmarks/clone-objects-via-spread-first.js: Added.
(test):
* JSTests/stress/spread-first.js: Added.
(shouldBe):
(test):
(shouldBe.JSON.stringify.test):
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::ObjectLiteralNode::emitBytecode):
Canonical link: https://commits.webkit.org/281159@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes