Bug 221668

Summary: [JSC] Simplify excludedSet handling in object rest expression
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ashvayka, ews-watchlist, keith_miller, mark.lam, msaboff, saam, ticaiolima, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=279863
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
none
Patch ashvayka: review+

Yusuke Suzuki
Reported 2021-02-10 02:54:47 PST
[JSC] Simplify excludedSet handling in object rest expression
Attachments
Patch (30.34 KB, patch)
2021-02-10 02:55 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (30.79 KB, patch)
2021-02-10 02:57 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (30.99 KB, patch)
2021-02-10 03:00 PST, Yusuke Suzuki
no flags
Patch (31.13 KB, patch)
2021-02-10 12:43 PST, Yusuke Suzuki
no flags
Patch (34.12 KB, patch)
2021-02-13 01:00 PST, Yusuke Suzuki
no flags
Patch (34.11 KB, patch)
2021-02-13 03:01 PST, Yusuke Suzuki
ashvayka: review+
Yusuke Suzuki
Comment 1 2021-02-10 02:55:00 PST
Yusuke Suzuki
Comment 2 2021-02-10 02:57:27 PST
Yusuke Suzuki
Comment 3 2021-02-10 03:00:51 PST
Yusuke Suzuki
Comment 4 2021-02-10 12:43:28 PST
Yusuke Suzuki
Comment 5 2021-02-10 13:29:30 PST
This should be definitely good for memory :)
Yusuke Suzuki
Comment 6 2021-02-13 01:00:32 PST
Yusuke Suzuki
Comment 7 2021-02-13 02:59:44 PST
Ah, failure is due to the test (and because copy-data-properties become faster by this patch possibly). Fixing it separately.
Yusuke Suzuki
Comment 8 2021-02-13 03:00:03 PST
(In reply to Yusuke Suzuki from comment #7) > Ah, failure is due to the test (and because copy-data-properties become > faster by this patch possibly). Fixing it separately. <https://commits.webkit.org/234068@main> for that.
Yusuke Suzuki
Comment 9 2021-02-13 03:01:45 PST
Caio Lima
Comment 10 2021-02-15 03:08:16 PST
Comment on attachment 420219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420219&action=review Informal r+. This patch is really good. Does it impact any other benchmark? > Source/JavaScriptCore/ChangeLog:13 > + need to call Set#add in JS side. Very nice! > Source/JavaScriptCore/ChangeLog:18 > + side-effect free if the input is number or string. It would be nice have in the ChangeLog the microbenchmark results. > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:5620 > + // This must be non-tail-call because of @copyDataProperties's assumption. It would be nice to state this assumption here. For instance, it's not clear to me which assumption you are talking about. > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:-904 > - continue; Great that this allows move this check back to `forEachProperty`
Alexey Shvayka
Comment 11 2021-02-15 15:03:43 PST
Comment on attachment 420219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420219&action=review This is a thing of beauty, r=me. > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:5616 > + CallArguments args(generator, nullptr, 1); -1 bytecode op, nice. > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:875 > + auto propertyName = callFrame->uncheckedArgument(index).toPropertyKey(globalObject); nit: Can we have a comment saying "this isn't observable since ObjectPatternNode::bindValue() also performs ToPropertyKey"? > JSTests/ChangeLog:8 > + * microbenchmarks/object-rest-computed-destructuring.js: Added. nit: Stating microbenchmark progression would be nice for future ChangeLog readers.
Radar WebKit Bug Importer
Comment 12 2021-02-17 02:55:13 PST
Yusuke Suzuki
Comment 13 2021-02-19 01:23:29 PST
Comment on attachment 420219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420219&action=review >> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:875 >> + auto propertyName = callFrame->uncheckedArgument(index).toPropertyKey(globalObject); > > nit: Can we have a comment saying "this isn't observable since ObjectPatternNode::bindValue() also performs ToPropertyKey"? Yeah, added :)
Yusuke Suzuki
Comment 14 2021-02-19 01:23:52 PST
Comment on attachment 420219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420219&action=review >> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:5620 >> + // This must be non-tail-call because of @copyDataProperties's assumption. > > It would be nice to state this assumption here. For instance, it's not clear to me which assumption you are talking about. Yup, added.
Yusuke Suzuki
Comment 15 2021-02-19 01:36:35 PST
Yeah, this is showing 2x perf boost. ToT Patched object-rest-computed-destructuring 62.9960+-6.5072 ^ 30.2157+-1.1420 ^ definitely 2.0849x faster
Yusuke Suzuki
Comment 16 2021-02-19 01:44:22 PST
Note You need to log in before you can comment on or make changes to this bug.