Assign values vs. push in Javascript arrays
There is this myth that assigning array elements is better performant than push. I believe this originated from Javascript of yore, but is not relevant anymore. In fact, today push may be almost equal to or edge out assignment of array elements using keys (depending on runtime engine that is). A quick test Let us do a really quick test - create an array of 1000 elements, assign each element with key compare the performance against just pushing a 1000 elements to a blank array Code below - ...