Closed
Bug 692960
Opened 13 years ago
Closed 13 years ago
Add Array.concat stub for concatenating two known dense arrays
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: bhackett1024, Unassigned)
References
Details
Attachments
(1 file)
15.46 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
Another behavior in PeaceKeeper 2.0's arrayCombined where we are absurdly slow compared to V8. While there is ongoing work to add dense array paths to Array.concat (bug 609896), it will be faster yet to call a stub which just does a malloc + 2 memcpys. This can only be done in limited circumstances (type effects of the call have been accounted for, statically known dense arrays, ...) so does not subsume other concat improvements. With the attached patch: function foo(x, y) { for (var i = 0; i < 500000; i++) x.concat(y); } var x = []; var y = []; for (var i = 0; i < 100; i++) y[i] = i; foo(x, y); js -m -n (old): 701 js -m -n (new): 3550 js -m -j -p: 2725 d8: 71 We still get clobbered by V8 here due to a combination of a lack of generational collection, allocating array buffers with malloc, and fat values. Not really sure which, as tweaking the constants gives pretty nonlinear behavior.
Attachment #565668 -
Flags: review?(dvander)
Updated•13 years ago
|
Attachment #565668 -
Flags: review?(dvander) → review+
Reporter | ||
Comment 2•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c537139643a9
Comment 3•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c537139643a9
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in
before you can comment on or make changes to this bug.
Description
•