Just some interesting info on Array.push() vs array index assignment: http://www.scottlogic.co.uk/2010/10/javascript-array-performance/