Open Bug 1887300 Opened 8 months ago Updated 4 months ago

Codepen demo (https://codepen.io/internette/pen/yqpQpE) is ~2x slower in Nightly

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 2 open bugs, )

Details

Go to https://codepen.io/internette/pen/yqpQpE
On the top, change "side length" to 5
Click anywhere within the demo

Nightly: https://share.firefox.dev/3x9xbdR (45s)
Chrome: https://share.firefox.dev/4a5Dg9w (26s)

At first glance, it looks like the problem here is that we're failing to inline a findIndex call (and the lambda it's calling) in this code:

center_coords = center_coords.filter(function (coord, index, self) {
    return index === self.findIndex(function (coord_obj) {
      return coord_obj.x === coord.x && coord_obj.y === coord.y;
    });
  });

Putting this on my list of things to look at next time we do a deep dive on inlining heuristics.

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