Created
September 29, 2010 16:20
-
-
Save getify/603041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0, j = foo.length; i < j; i++) { | |
// do stuff | |
} | |
for (var i = foo.length; i;) { | |
// first usage in loop: blah[--i] | |
// do stuff slightly faster in reverse order | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That might be the case in the particular version of Chrome 6 you were using to test. In the tests I performed, however, there was a greater than 1% difference.