underscore reduce | _.reduce(A, function(v, e) {
return v + e
}, 0)
| ready |
for loop | i = 0;
v = 0;
for (i; i < I; i++) {
v += A[i]
}
| ready |
javascript reduce | A.reduce(function(v, e) {
return v + e
}, 0)
| ready |
while (1) |
i = I;
v = 0;
while (i > 7) v += A[--i] + A[--i] + A[--i] + A[--i] + A[--i] + A[--i] + A[--i] + A[--i];
while (i > 0) v += A[--i];
| ready |
while (2) |
i = I;
v = 0;
while (i > 7) v += A[i - 1] + A[i - 2] + A[i - 3] + A[i - 4] + A[i - 5] + A[i - 6] + A[i - 7] + A[i -= 8];
while (i > 0) v += A[--i];
| ready |
while (3) |
i = I;
v = 0;
while (i > 7) v += A[i - 1] + A[i - 2] + A[i - 3] + A[i - 4] + A[i - 5] + A[i - 6] + A[i - 7] + A[i -= 8];
switch (i) {
case (7):
v += A[6];
case (6):
v += A[5];
case (5):
v += A[4];
case (4):
v += A[3];
case (3):
v += A[2];
case (2):
v += A[1];
case (1):
v += A[0];
};
| ready |
while (4) |
i = I;
v = 0;
while (i > 7) v += A[i - 1] + A[i - 2] + A[i - 3] + A[i - 4] + A[i - 5] + A[i - 6] + A[i - 7] + A[i -= 8];
switch (i) {
case (0):
break;
case (1):
v += A[0];
break;
case (2):
v += A[0] + A[1];
break;
case (3):
v += A[0] + A[1] + A[2];
break;
case (4):
v += A[0] + A[1] + A[2] + A[3];
break;
case (5):
v += A[0] + A[1] + A[2] + A[3] + A[4];
break;
case (6):
v += A[0] + A[1] + A[2] + A[3] + A[4] + A[5];
break;
case (7):
v += A[0] + A[1] + A[2] + A[3] + A[4] + A[5] + A[6];
break;
};
| ready |
while (5) |
i = I;
v = 0;
while (i > 7) v += A[i - 1] + A[i - 2] + A[i - 3] + A[i - 4] + A[i - 5] + A[i - 6] + A[i - 7] + A[i -= 8];
switch (i) {
case (0):
break;
case (1):
v += A[0];
break;
case (2):
v += A[1] + A[0];
break;
case (3):
v += A[2] + A[1] + A[0];
break;
case (4):
v += A[3] + A[2] + A[1] + A[0];
break;
case (5):
v += A[4] + A[3] + A[2] + A[1] + A[0];
break;
case (6):
v += A[5] + A[4] + A[3] + A[2] + A[1] + A[0];
break;
case (7):
v += A[6] + A[5] + A[4] + A[3] + A[2] + A[1] + A[0];
break;
};
| ready |