-
-
Save jdalton/3d3a070815e72f418cf0 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 sum = 0, i = 0, j = 0; i < array.length; i++, j= i+5) { | |
// Bounds check elimination can analyze the loop and determine that | |
// `array.length` is say `10` so `i` will only ever be `0`-`9` and | |
// `otherArray.length` is say `20` and `j` will be `0`-`14`. | |
sum += array[i] + otherArray[j]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment