Oddly enough, new Array(size)
is almost 2x faster than []
in Chrome, and about the same in FF and IE (measured by creating and filling an array). It only matters if you know the approximate size of the array. If you add more items than the length you've given, the performance boost is lost.
More accurately: Array(
is a fast constant time operation that allocates no memory, wheras []
is a linear time operation that sets type and value.