Closed Bug 576926 Opened 14 years ago Closed 14 years ago

JM: PICs for escaped call objects

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

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);
As a note, currently TM is faster than V8 on this, but not a huge amount. It's definitely faster than nitro.
Assignee: general → dvander
tm-tip score: 7553 jm-tip score: 395
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
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?
(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.
Blocks: 577036
Makes sense. I filed bug 577036.
Blocks: 576687
Blocks: 576688
You need to log in before you can comment on or make changes to this bug.