Closed
Bug 927548
Opened 11 years ago
Closed 8 years ago
consider implementing scalar replacement for iterators
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
People
(Reporter: bkelly, Unassigned)
References
Details
(Keywords: perf)
Consider implementing scalar replacement in our JavaScript engine. As discussed in bug 907077 it would be very useful in order to avoid object allocations on each iteration of the new es6 for-of loops.
Updated•11 years ago
|
Component: JavaScript Engine → JavaScript Engine: JIT
Comment 1•11 years ago
|
||
I am already working on this on my spare time as part of the rewrite of the Alias Analysis (Bug 897606) before implementing Escape Analysis (Bug 856533).
One of the problem of Scalar Replacement is that we need to add annotation into the resume points to recover the state of the iterator. Recover instructions (Bug 878503) introduces a generic way to solve this problem for any MIR instructions which has an equivalent recover instructions.
Comment 2•11 years ago
|
||
Side note, we now have a form of scalar replacement in IonMonkey (see Bug 992845 and Bug 1040027).
Still, I do think that the current implementation of our scalar replacement need some improvement such as Bug 897606, on which I will work in the next few weeks.
Summary: consider implementing scalar replacement optimization → consider implementing scalar replacement for iterators
Comment 3•8 years ago
|
||
This issue got fixed with the landing of Scalar Replacement. Still I will note that even if the next function can be inlined as well as the object returned by the next function, the iterator object is not inlined if we OSR in the loop, but it would be if we enter the loop frequently.
Status: NEW → RESOLVED
Closed: 8 years ago
Priority: -- → P3
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•