For (i = 1; i < 10000; i++)
{
a[i] = i * i;
b[i] = a[i] * i;
c[i] = b[i] * i;
}
Now that's not a lot of code but with array bounds checking you add 50,000 bounds checks that do nothing useful if the arrays are of the correct size. Clearly there are uses where those bounds checks are useful, but when you care about speed they can become fairly costly.You might even want to rewrite it as because it really is faster:
For (i = 1; i < 10000; i++)
{
c[i] = i * (b[i] = i * (a[i] = i));
}
PS: Ugly c code often has a vary good reason for looking the way it does.