I would be surprised if this was faster. Note that we patch non ES5 browsers in core, so this will definitely perform worse for non ES5 browsers (IE8 in particular). I'd keep the while loop. Go look at Array.js in core and you'll see that we don't use this for array operations.