IonMonkey: string.split, array.map and array.filter slower with Ion

RESOLVED FIXED

Status

()

RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: jandem, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ion:t])

(Reporter)

Description

6 years ago
cers reported this on IRC. For the "split" micro-benchmark below we have:

JM+TI : 1198 ms
Ion   : 2594 ms

The problem is that these functions call GetTypeCallerInitObject, which calls currentScript. We want to self-host map and filter eventually, and we could specialize split.

function f() {
    var s = "";
    var t = new Date;
    for (var i=0; i<10000000; i++) {
        s.split(s);
    }
    print(new Date - t);
}
f();
The real issue is that we end up in GetPcScript.  See bug 728045.
Bleh - once again, I think this is indicative of a design flaw in the engine, and not a problem with GetPcScript. Though if there's no easy workaround for these maybe we should hack something up, like a one-entry cache.
Well, by "real issue" I meant "where the time gets spent".  No opinion on how to fix it.  ;)
With Bug 794679 fixed, local results are 1488 ms with --no-ion, 1579 with ion.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Well, it's still slower, just not as much slower, right?
Depends on: 1193280
You need to log in before you can comment on or make changes to this bug.