-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Multiple assignment has taken a perf hit in 9k compared to 1.7, and there's other opportunities to go beyond 1.7.
The main issue is that it's always producing the RHS array for some forms, and simply not eliminating it for other forms.
This case should optimize to simple moves. I believe it doesn't because DCE is not running:
a, b, c = d, e, fThis case, where ary is already an array, should not have to dup the array. I believe we dup it now preemptively because it may be used as the return value of the expression. However this won't go away with DCE because ary is opaque (assume it's opaque below).
ary = [1,2,3]
...
a, b, c = *aryThese cases affect performance on e.g. https://github.com/YorickPeterse/oga because it uses masgn in the second way above. Many other libraries use these forms too.
Reactions are currently unavailable