Open Bug 1541671 Opened 5 years ago Updated 2 years ago

Poor generator performance on Jetstream2 Basic test

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

Tracking Status
firefox68 --- affected

People

(Reporter: denispal, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

The "Basic" test in Jetstream2 performs very poorly in Firefox compared to Chrome:

Firefox:
Basic - 82.584
First - 63.291, Worst - 81.633, Average - 109.014

Chrome:
Basic - 302.385
First - 72.464, Worst - 434.783, Average - 877.581

Profile is here: https://perfht.ml/2Udx5O7

Most of the time is spent in the generator function from here: https://github.com/WebKit/webkit/blob/master/PerformanceTests/ARES-6/Basic/ast.js#L260-L272

Looking at the data, all of the time is spent in Baseline and this function is never Ion compiled which seems like it is intentional. Is there a way we can remove that restriction?

Here is an artificial test case that also exhibits the problem:

n = 10000000;

function* generator(i) {
    while(i--) {
      yield i;
    }
}


time1 = new Date().getTime();
g = generator(n);
for (i=0;i<n;i++) {
  g.next();
}
time2 = new Date().getTime();
console.log(time2-time1);

nodejs = 169 ms
spidermonkey = 512 ms

Type: task → defect
Depends on: 1317690

Note that this and other ARES6 tests are also tracked by bug 1304984.

This is a straightforward dup of bug 1317690, which is a big chunk of work. We don't have concrete plans to do that yet.

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