Open Bug 1873768 Opened 2 years ago Updated 1 year ago

Creating JS wrappers for DOM nodes (e.g. when accessing nextSibling) is slower than in Safari

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mstange, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached file testcase

Steps to reproduce:

  1. In the attached testcase, click the buttons in the following order: iterate, iterate, setprop, iterate, iterate

Firefox:
iterate: 75ms
iterate: 75ms
setprop: 70ms
iterate: 55ms
iterate: 52ms

Safari:
iterate: 12ms
iterate: 9ms
setprop: 11ms
iterate: 10ms
iterate: 11ms

I don't think this is the primary difference, but I notice that we are spending a lot of time in LookupStdName, which does a linear scan through a reasonably long list of prototypes. I wonder if a binary search would be faster there.

Severity: -- → N/A
Priority: -- → P3
Blocks: sm-js-perf
No longer blocks: sm-runtime

Profile from a mozregression launched build.

https://share.firefox.dev/3DpjCtW

Puts 70% of time in LinkedList::asT, called from IncrementalFinalizeRunnable::ReleaseNow

O.o

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: