|
|
|
|
|
by mikepurvis
4836 days ago
|
|
Interesting. On a whim, I tried changing your fiddle to use Array.join construction rather than string appends, but string appends remain 5-10% faster: http://jsfiddle.net/2kWdC/ That way uses an indexed for-loop, but the while loop with Array.push was just as bad. |
|
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.