jquery/jquery — pull request #844 by orkel (2012-06-29 15:36:24+00:00)
Title: Optimization of array operations

Couple of them.

Line: https://github.com/jquery/jquery/blob/master/src/core.js#L178

jQuery#pushStack uses push.apply, if first argument is array, but what interesting is that jQuery.merge usually faster then or equal with push.apply – http://jsperf.com/push-vs-jquery-merge

Line: https://github.com/jquery/jquery/blob/master/src/traversing.js#L204

Here used jQuery.makeArray, which then goes straight to jQuery.merge, in order to decrease function call stack it's probably better to use jQuery.merge

Lines: https://github.com/jquery/jquery/blob/master/src/manipulation.js#L163,
https://github.com/jquery/jquery/blob/master/src/manipulation.js#L151

Same thing with push, but also, there is a small "bug" – http://jsfiddle.net/rpuPs/