Last Comment Bug 759289 - IonMonkey: JM -> Ion calls are slow
: IonMonkey: JM -> Ion calls are slow
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Jan de Mooij [:jandem]
:
Mentors:
Depends on: 759409
Blocks: IonSpeed
  Show dependency treegraph
 
Reported: 2012-05-29 05:14 PDT by Jan de Mooij [:jandem]
Modified: 2012-06-01 05:43 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (5.25 KB, patch)
2012-05-30 06:45 PDT, Jan de Mooij [:jandem]
dvander: review+
Details | Diff | Review

Description Jan de Mooij [:jandem] 2012-05-29 05:14:06 PDT
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.
Comment 1 Jan de Mooij [:jandem] 2012-05-30 06:45:14 PDT
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.
Comment 2 Jan de Mooij [:jandem] 2012-06-01 05:43:37 PDT
https://hg.mozilla.org/projects/ionmonkey/rev/c4ba8fc5a1d0

Note You need to log in before you can comment on or make changes to this bug.