Closed
Bug 576926
Opened 14 years ago
Closed 14 years ago
JM: PICs for escaped call objects
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: dvander)
References
Details
Dromaeo uses escaped closures, so we need to PIC these to get good performance on it. See also bug 576733.
Shell testcase:
var x = (function() {
var ret;
var str = "abc";
return function() {
for (var j = 0; j < 5000; ++j) {
ret = str.charAt(0)
ret = str.charAt(str.length - 1)
}
}
})()
var start = new Date();
var i = 0;
while ((new Date()) - start < 1000) {
++i;
x();
}
print((i / (new Date() - start)) * 1000);
Reporter | ||
Comment 1•14 years ago
|
||
As a note, currently TM is faster than V8 on this, but not a huge amount. It's definitely faster than nitro.
Assignee | ||
Updated•14 years ago
|
Assignee: general → dvander
Assignee | ||
Comment 2•14 years ago
|
||
tm-tip score: 7553
jm-tip score: 395
Assignee | ||
Comment 3•14 years ago
|
||
http://hg.mozilla.org/users/danderson_mozilla.com/moo/rev/f801691c33ba
^-- PIC for reads from escaped call objects.
New score: 830
Assignee | ||
Comment 4•14 years ago
|
||
http://hg.mozilla.org/users/danderson_mozilla.com/moo/rev/9889018ba3cf
^-- PIC for writes to escaped call objects.
New score: 2130
Assignee | ||
Comment 5•14 years ago
|
||
Shark says 28% of time is now in SlowCall, 23% in str_charAt. In the tracer, 43% is in String_getelem - this might be completely inlined.
v8's score is 10,000, and according to shark it looks like it inlines charAt as well.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•14 years ago
|
||
On the dromaeo charAt test, this patch took the score from 181.82runs/s to 1191.00runs/s. So much better, for sure. TM is at 2715.00runs/s.
Do we need followup bugs on the remaining slowdown vs v8 or TM?
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
Sure. I think most of it is "make calls fast" (bug 572275) - though maybe a bug to track this specific benchmark would be good.
Reporter | ||
Comment 8•14 years ago
|
||
Makes sense. I filed bug 577036.
You need to log in
before you can comment on or make changes to this bug.
Description
•