Implement JSOp::InitElemArray without ICs
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(2 files)
Warp already does this but now that TI is gone we can do the same in Baseline. We can also simplify the C++ interpreter implementation to match the JIT code. This is a pretty big speedup for array literals in the interpreter/Baseline.
Assignee | ||
Comment 1•4 years ago
|
||
These ops are pretty different so it's simpler and more efficient to implement them
separately.
Also optimizes the implementation of InitElemArray (InitElemArrayOperation) to just
initialize the dense element directly. This is a pretty big speedup for the C++
interpreter and matches what Warp code does. The next patch will change the Baseline
implementation to match the C++ code.
This also removes the unused InitElementArray function.
Assignee | ||
Comment 2•4 years ago
|
||
Without TI it's easy to inline this completely, similar to the C++ implementation
and Warp version.
This has separate implementations for Baseline Interpreter and JIT, because the
JIT implementation can be optimized a bit more because the index is a constant and
we know statically whether the value is a hole. We can also eliminate the post-barrier
if the value is a simple constant, which is pretty common for array literals.
This is nice also because it helps mitigate regressions from removing COW-arrays.
Depends on D99068
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c03352e35f50
https://hg.mozilla.org/mozilla-central/rev/de5572572209
Description
•