Open Bug 1861660 Opened 1 year ago Updated 1 year ago

Tiny JS demo is 1.4x slower in Nightly compared to Chrome (and spends all time in Baseline)

Categories

(Core :: JavaScript Engine, task, P4)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Open the attached testcase (original testcase from https://github.com/xem/miniMandelbrot)

<canvas id=A><svg onload=for(Q=5e4;Q--;A.getContext2d.fillRect(Q%X,Q/X,1,I/X))for(V=W=0,X=I=297;I--/V;W=Z+Z+Q/2e4-1)Z=VW,V=VV-W*W+Q/99%3-2>

Nightly: https://share.firefox.dev/46YivuG (13s)
Chrome: https://share.firefox.dev/46PK2Po (9s)

I figure that the code is written in un-conventional manner and thats why it is slower.

Attached file index.html

This is spending almost all of its time doing slow environment name lookups. Because of how this code is written, it all runs in an event handler context, where we use non-syntactic with objects to add DOM elements to the environment chain.

Going to give this a lower-than-normal priority due to the event handler name lookup issues.

Perhaps we will have a better story eventually, but doubt it's high priority.

Severity: -- → S4
Priority: -- → P4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: