+117
−1
Loading
With this patch we can optimize almost all calls to `concat` on Speedometer 3 to allocate the array with the right number of elements from the start. We then just have to copy the elements from the source object(s). The zero-args case shows up a number of times, in this case we just clone the array. The one-arg case is most common, both to concatenate two arrays and to copy an array and adding a new element to it. This patch lets us optimize each of these three cases. Differential Revision: https://phabricator.services.mozilla.com/D175778