Re:The DOM isn't slow
by iwillreply on Tuesday March 19, 2013 @11:12AM
(#5401343)
Interesting, I very briefly deliberated while vs for, and how the performance of both had changed since last look.
But checking at: https://blogs.oracle.com/greimer/resource/loop-test.html
Still seemed to demonstrate a decreasing while loop as the fastest in my test.
http://jsfiddle.net/2kWdC/
That way uses an indexed for-loop, but the while loop with Array.push was just as bad.