
JS, creating a new array using the new keyword vs. literal - muhammadusman
http://blog.usmanity.com/javascript-arrays-creating-a-new-one-using-the-new-keyword-vs-literal/
======
cleverjake
I work on a major browser. The key thing to keep in mind is that modern
javascript engines have an optimized JIT. That means that they are able to
optimize code paths for the most common paths on the web. Since its much less
likely to see code in the wold that uses the "new Array" pattern, it will most
likely be slower than the much (MUCH) more commonly used literal version.

also, microbenchmarks like this are silly, since you probably will never need
several million new arrays to be allocated.

~~~
muhammadusman
thanks for the information, I wanted to just illustrate the difference between
the two. I bet no real world JS would be slow b/c of a few `new Array` calls.

