Closed
Bug 792631
Opened 13 years ago
Closed 13 years ago
IonMonkey: Slow property access perf regression.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: mbx, Assigned: nbp)
References
(Blocks 1 open bug)
Details
(Keywords: regression, Whiteboard: [ion:p2])
Attachments
(2 files)
9.51 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
12.86 KB,
patch
|
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
The following code is ~ 10x slower in IonMonkey, 65s (js) vs 6s with (js --no-ion) on a MacPro 2x2.4 GHz Quad-Core Intel Xeon:
function bar() {
var a = {x: 1}, b = {y: 2};
var o = a;
var s = 0;
for (var i = 0; i < 500000000; i++) {
s += o.x !== undefined ? o.x : (o.y !== undefined ? o.y : 3);
if (i === 1000) {
o = b;
}
}
return s;
}
print(bar());
Comment 1•13 years ago
|
||
Some more context: optimizing ActionScript property accesses in Shumway (the Flash-in-JS research project) depends on this being fast.
Comment 2•13 years ago
|
||
Testcase spends all its time in the GetPropertyCache, never actually caching anything, searching through ShapeTables, etc. When a shape lookup fails, we don't cache |undefined| return.
![]() |
||
Comment 3•13 years ago
|
||
JM has a missing property IC to handle this case, I believe...
tracking-firefox18:
--- → ?
Keywords: regression
![]() |
||
Updated•13 years ago
|
Whiteboard: [ion:p2]
Updated•13 years ago
|
Assignee | ||
Comment 4•13 years ago
|
||
Assignee: general → nicolas.b.pierron
Status: NEW → ASSIGNED
Attachment #673524 -
Flags: review?(dvander)
Assignee | ||
Comment 5•13 years ago
|
||
Comment on attachment 673524 [details] [diff] [review]
Add Ion IC for missing properties.
Review of attachment 673524 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/IonCaches.cpp
@@ +1168,5 @@
> if (!JSObject::lookupProperty(cx, obj, name, &holder, &shape))
> return false;
>
> + if (!IsCacheableGetPropReadSlot(obj, holder, shape) &&
> + !IsCacheableNoProperty(obj, holder, shape, NULL, output())) {
I fixed a failure here, I added the pc and checked for JSOP_CALLELEM in IsCacheableNoProperty to prevent IC with __noSuchMethod__.
Comment on attachment 673524 [details] [diff] [review]
Add Ion IC for missing properties.
Review of attachment 673524 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/IonCaches.cpp
@@ +283,5 @@
> + Address(holderReg, JSObject::offsetOfShape()),
> + ImmGCPtr(holder->lastProperty()),
> + &prototypeFailures);
> + } else {
> + // The property does not exists. Guard on everything in the
s/does not exists/does not exist/
Attachment #673524 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 8•13 years ago
|
||
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Assignee | ||
Comment 11•13 years ago
|
||
This patch includes the original patch plus Bug 807035 and Bug 807047 with a little modification (in methodjit/PolyIC.cpp) to change the MarkNotIdempotent call because the unsafeGet function does not exists in Aurora.
[Approval Request Comment]
Bug caused by (feature/regressing bug #):
N/A, a similar feature was added to JM in fx17, and Ion was added in fx18 without the equivalent. The goal is to back-port this change to fx18 to avoid regressions
User impact if declined:
Prevent IonMonkey regression feeling.
Testing completed (on m-c, etc.):
Yes, Bug 807035 and Bug 807047 are now fixed an no new bug seems to blame this patch.
Risk to taking this patch (and alternatives if risky):
Low risk.
String or UUID changes made by this patch:
N/A
Attachment #679760 -
Flags: approval-mozilla-aurora?
Comment 12•13 years ago
|
||
Comment on attachment 679760 [details] [diff] [review]
Backport patches.
Approving on Aurora . Bug is tracking 18,been on central for a week,low risk & is needed to avoid possible regressions due to IonMonkey landing in 18.
Attachment #679760 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 13•13 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•