[Solved] How do I optimize C code using loop transformation? [closed]
Aside from using two separate loops, the original code contains lots of redundant statements. One possible improvement would be this: int tmp = 6 * h; for (j = 1; j <= 4; j++) { a[j] = tmp; b[j] = 6 + 3 * j * j; } The main optimizations: One loop instead on … Read more