IonMonkey: JM -> Ion calls are slow

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Updated

5 years ago
Depends on: 759409
(Assignee)

Comment 1

5 years ago
Created attachment 628326 [details] [diff] [review]
Patch

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+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/c4ba8fc5a1d0
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.