Closed Bug 794117 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ion:t])

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
Closed: 8 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.