Open Bug 1344177 Opened 7 years ago Updated 1 year ago
Need a faster Define
Element for Array Splice Copy
This is the main reason we're slower than Chrome in bug 1342797 (after fixing bug 1344173). If for some reason we don't inline the DefineDataProperty intrinsic or are unable to optimize array.splice better, we fall back to the extremely slow DefineProperty/DefineElement path. We should at least add a fast path for arrays.
Maybe we should add a separate DefineElement intrinsic. DefineElement would always take 3 arguments (instead of DefineDataProperty's 3 or 4), and we could add a fast path to DefineElement for when we're defining an array element at offset denseInitializedLength. Ion could try to inline both intrinsics so there shouldn't be any difference there. Till, what do you think?
That sounds very good! It'd be even better if we could also do something about defineProperty for non-elements, but yes, this would sure be very helpful, including on lots of real-world code. Let me know if I can help somehow.
Cool. I have some other performance bugs to fix so I'm not working on this yet, but this is definitely something we should fix.
Bug 1344463 will deal with _DefineDataProperty. We should still make ArraySpliceCopy faster, once the other bugs are fixed this will be the main reason why we're slower than Chrome on bug 1342797.
Summary: Need a faster DefineElement for ArraySpliceCopy and intrinsic_DefineDataProperty → Need a faster DefineElement for ArraySpliceCopy
Moving to p3 because no activity for at least 1 year(s). See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.