Open Bug 2049588 Opened 1 month ago Updated 3 days ago

Testcase simulating js execution of Backbone-SP3 is 13x-2x slower in different scenarios.

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file Backbone sp3 JS.html

STR:

  1. Open testcase
  2. From the dropdown, select each mode in order.
  3. Run the test
  4. Refresh and go back to step2

In order of dropdown
Firefox: https://share.firefox.dev/4eEp0Z1 (460ms, 1.3s, 900ms, 220ms, 650ms)
Chrome: https://share.firefox.dev/4w2me6K (110ms, 100ms, 600ms, 100ms, 100ms)

I ran backbone-sp3 in samply and fed the profile to Chatgpt. I also shared the link to SP3 github repo. I then asked it to find hotspots in the profile, and based on the pattern/shape of Backbone, create a minimal testcase.
The testcase is generated by chatgpt, so its resemblance with actual Backbone-SP3 should be verified.

This is the profile i gave to chatgpt: https://share.firefox.dev/4b2QyWQ

Severity: -- → N/A
Priority: -- → P3
See Also: → 2049565

The biggest gap here is the scripted version, which is a deep chain of calls to a leaf function that does nothing. All these functions are defined nested in V8 inlines it all away; we inline most of it, but we still spend a lot of time guarding that the callee function is still what we expect. We have this design doc describing a potential solution to that problem, but it may require some finicky work in the parser to get the information we need.

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

Attachment

General

Creator:
Created:
Updated:
Size: