jashkenas/underscore — pull request #1394 by mcbex (2014-01-03 01:21:02+00:00)
Title: assign value to new arrays at creation in _.groupBy

In _.groupBy new arrays are created empty, then the current value is added via array.push. It would be faster to create new arrays and assign value in one step and only call push on existing arrays.

A jsperf comparison as proof of concept: http://jsperf.com/array-push-vs-literal