There is nothing wrong with using new Array() to construct array of known capacity. By default, I think JS literal arrays will have a capacity of 4, so especially if you know you will have less than four elements, or a non power of two number of elements, this can be seen as a micro-optimization. `bluebird` uses new Array() extensively, e.g.
3 comments
[ 1.7 ms ] story [ 16.2 ms ] thread+1 for the corroboration
I was going through the differences and it started acting weirdly so I thought let's share this.
https://github.com/petkaantonov/bluebird/blob/12154adb501660...