Closed Bug 892931 Opened 7 years ago Closed 7 years ago

IonMonkey: CallKnown: Don't emit slow path if callee can't be Ion-compiled but can be Baseline-compiled

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
CallKnown emits a slow path if the callee can't be Ion-compiled. However, nowadays we can also call into Baseline scripts using the same code so going through the VM in this case is no longer necessary in most cases (since Baseline compiles almost everything).

Here's a simple micro-benchmark:

function g() {
    try { } catch(e) {}
    return 3;
}
function f() {
    for (var i=0; i<10000000; i++)
	g();
}
var t = new Date;
f();
print(new Date - t);

Before: 1747 ms
After :   98 ms

(Noticed this while looking at some fuzz bug.)
Attachment #774576 - Flags: review?(hv1989)
Comment on attachment 774576 [details] [diff] [review]
Patch

Review of attachment 774576 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch !!
Attachment #774576 - Flags: review?(hv1989) → review+
https://hg.mozilla.org/mozilla-central/rev/d1f17915555b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.