Closed
Bug 1056795
Opened 10 years ago
Closed 10 years ago
Optimize ArrayPushDense
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(1 file)
1.18 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
jit::ArrayPushDense is the slow path for inlined Array.push calls. It forwards to js::array_push, but that function is too generic/slow. On Octane-deltablue we spend about 5% under ArrayPushDense. The attached patch adds a fast path to jit::ArrayPushDense. It improves the micro-benchmark below from 894 to 715 ms and wins at least a few hundred points on deltablue. Now with GGC we could also add a JitCode stub to handle reallocating/copying the elements without any VM calls, but that's a lot more work and this is a very easy win for now. function f() { var t = new Date; for (var i=0; i<1000000; i++) { var arr = []; for (var j=0; j<130; j++) arr.push(j); } print(new Date - t); } f();
Attachment #8476662 -
Flags: review?(bhackett1024)
Updated•10 years ago
|
Attachment #8476662 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 1•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4877238de09
https://hg.mozilla.org/mozilla-central/rev/a4877238de09
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•