Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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