Closed Bug 759289 Opened 12 years ago Closed 12 years ago

IonMonkey: JM -> Ion calls are slow

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Consider the following micro-benchmark:
--
function g() {
    while (0) {} // Don't inline g.
}
function f() {
    try {} catch(e) {}; // Force JM.
    for (var i=0; i<10000000; i++) {
        g();
        g();
    }
}
var t = new Date;
f();
print(new Date - t);
--
We fall back to JM for |f| and use IonMonkey to compile |g|. I get the following numbers:

JM     :  131 ms
JM+Ion : 2713 ms
interp : 2724 ms

This is way too slow and affects ss-md5 and probably other benchmarks.
Depends on: 759409
Attached patch PatchSplinter Review
Applies on top of bug 759409. This uses JM for calls from a JM call IC. It works for the testcase in comment 0 and makes crypto-md5 a bit faster. We'll have to see how this works in practice but I hope this is sufficient.
Attachment #628326 - Flags: review?(dvander)
Attachment #628326 - Flags: review?(dvander) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/c4ba8fc5a1d0
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.