Open
Bug 1846051
Opened 1 year ago
Updated 1 year ago
Array destructuring is slow
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Core
JavaScript Engine: JIT
Tracking
()
NEW
People
(Reporter: dthayer, Assigned: dthayer)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Array destructuring currently follows the iterator protocol, which is unnecessarily slow. We should add a fast path in bytecode as a first step.
Updated•1 year ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-486
Assignee | ||
Comment 1•1 year ago
|
||
This is I think the simplest possible approach. This patch basically just
mirrors the OptimizeSpreadCall optimization, but for array destructuring.
We did add one constraint which has effects outside of this, which is that
the array iterator prototype can't have a return method defined. I think in
practice only very weird code should have this set, but we can be more
targeted if this is a real issue.
Updated•1 year ago
|
Severity: -- → N/A
Priority: -- → P1
You need to log in
before you can comment on or make changes to this bug.
Description
•