Closed Bug 1668557 Opened 3 years ago Closed 3 years ago

Warp: Optimize DOM method calls

Categories

(Core :: JavaScript Engine: JIT, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(1 file)

I have a WIP patch for this basically just extends CallNativeFunction with a isDOMCall flag. We additionally have to guard on the class of the |this| object. I decided to go for an actual class check here instead of a shape check. I think the actual call overhead probably makes the difference unimportant, but we get the benefit of covering a few more cases.

Maybe we should go for a different approach like CallDOMGetterResult and our own invoke wrapper function, not sure. This would definitely be more complicated though.

Open question:

  • New CacheIR instruction?
  • Guard on shape instead of class?
  • Does MCall::computeMovable work, do we need to something else?

w:wq

Assignee: nobody → evilpies
Severity: -- → N/A
Status: NEW → ASSIGNED
Priority: -- → P1
Attachment #9179010 - Attachment description: Bug 1668557 - WIP: Optimize DOM method calls. → Bug 1668557 - Optimize DOM method calls. r?jandem
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fb4c3059d0c1
Optimize DOM method calls. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

== Change summary for alert #27160 (as of Thu, 08 Oct 2020 20:42:22 GMT) ==

Improvements:

16% perf_reftest_singletons getElementById-1.html windows10-64-shippable-qr opt e10s stylo 58.76 -> 49.54
15% perf_reftest_singletons getElementById-1.html windows10-64-shippable opt e10s stylo 57.83 -> 49.21
14% perf_reftest_singletons getElementById-1.html macosx1014-64-shippable opt e10s stylo 58.41 -> 50.32
14% perf_reftest_singletons getElementById-1.html windows7-32-shippable opt e10s stylo 59.87 -> 51.68
9% perf_reftest_singletons getElementById-1.html linux64-shippable-qr opt e10s stylo 58.58 -> 53.18
7% perf_reftest_singletons getElementById-1.html linux64-shippable opt e10s stylo 56.36 -> 52.45

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=27160

== Change summary for alert #27168 (as of Fri, 09 Oct 2020 06:54:32 GMT) ==

Improvements:

6% raptor-assorted-dom-firefox linux64-shippable-qr opt webrender 82.67 -> 77.92
5% raptor-assorted-dom-firefox linux64-shippable opt 81.93 -> 77.78

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=27168

Keywords: perf-alert
You need to log in before you can comment on or make changes to this bug.