Closed
Bug 1176451
Opened 8 years ago
Closed 8 years ago
Optimize Array.concat when used on different types of objects
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
Details
Attachments
(1 file)
36.80 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Currently we only optimize Array.concat when the 'this' and argument object have the same boxed/unboxed representation. It would be better if we could optimize concat'ing different kinds of arrays; this affects performance a lot on kraken-stanford-crypto-pbkdf2, where double and int32 unboxed arrays are frequently concatenated. The attached patch fixes this, and also fixes a couple other performance issues. The unboxed array analysis is not forced the first time we try to attach a baseline cache for concat and other array natives (on pbkdf2 we would do this too early and end up using an unboxed int32 representation for a group that should really use an unboxed double representation) and the basic concat() native is augmented to use a similar optimized path to the specialized array_concat_dense and avoid some of the perf cost of calling this native.
Attachment #8625004 -
Flags: review?(jdemooij)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bhackett1024
Comment 1•8 years ago
|
||
Comment on attachment 8625004 [details] [diff] [review] patch Review of attachment 8625004 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsarray.cpp @@ +2565,2 @@ > DenseElementResult > ArrayConcatDenseKernel(JSContext* cx, JSObject* obj1, JSObject* obj2, JSObject* result) Hm I'm a bit worried about template bloat; this will emit like 36 copies. What's the increase in binary size, debug and opt build?
Assignee | ||
Comment 2•8 years ago
|
||
On 10.9 x64 an opt shell is .25% bigger, and a --enable-debug --disable-optimize shell is .23% bigger.
Comment 3•8 years ago
|
||
Comment on attachment 8625004 [details] [diff] [review] patch Review of attachment 8625004 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the delay.
Attachment #8625004 -
Flags: review?(jdemooij) → review+
Comment 5•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fdf5862a8c00
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
I backed this out in https://hg.mozilla.org/mozilla-central/rev/d6ea652c5799 to fix bug 1191492.
Assignee | ||
Comment 8•8 years ago
|
||
I relanded this patch as is because it looks like another bug caused bug 1191492.
Comment 9•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e671afb66591
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: mozilla42 → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•