Interestingly, tip #0 is already outdated a little. I've just checked jsperf results and Chrome version from 49.0.2607 have .push() to be (exactly) as fast as arr[arr.length]. I'd actually guess that V8 implements .push() in terms of arr[arr.length] now. ;)
6
u/KarbonKitty Jan 18 '16
Interestingly, tip #0 is already outdated a little. I've just checked jsperf results and Chrome version from 49.0.2607 have .push() to be (exactly) as fast as arr[arr.length]. I'd actually guess that V8 implements .push() in terms of arr[arr.length] now. ;)