CacheIR: Optimize global name DOM getters like bareword `document`
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: evilpies, Assigned: evilpies)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert)
Attachments
(1 file)
When doing something like document.getElementById
in JS, the document
lookup is actually a getter call on the global JS object (i.e, window
). By using our existing support for DOM getters from bug 1664617, we automatically get a huge performance boost. document
for example is a simple slot load using MGetDOMMember
instead of an actual call.
The micro benchmark getElementById-1.html for example improves from 120ms to 70ms.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
bugherder |
Comment 4•5 years ago
|
||
== Change summary for alert #27118 (as of Fri, 02 Oct 2020 16:36:58 GMT) ==
Improvements:
51% raptor-assorted-dom-firefox linux64-shippable-qr opt webrender 166.79 -> 81.58
50% raptor-assorted-dom-firefox linux64-shippable opt 162.80 -> 81.87
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=27118
Description
•