Open Bug 1939096 Opened 2 months ago Updated 1 month ago

Modified Codepen demo (https://codepen.io/Nilali/pen/VBZZYX) is 5x-6x slower in Nightly

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Attached file index.html

Open the attached testcase.

Chrome: https://share.firefox.dev/3PdfFLC (900ms)
Nightly: https://share.firefox.dev/3BLAZV8 (8s)

The demo is variable in nature, so the timings will be different each time you run it. But in general, Nightly is slower.

Looks like we're spending almost all our time in this code:

  for (x=1; x<w-1; x+=2) {
    for (y=1; y<h-1; y+=2) {
      if (m[y][x]==='#') d=0;
    }
  }

In particular, I think m[y][x] is the hotspot. This is another case where our array lookup seems slower than V8. Being this much slower is a bit surprising.

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

Attachment

General

Creator:
Created:
Updated:
Size: