CPP Tricks
which is faster: 2 for loops or a combined single loop?
OR
It depends on what the operation is being performed in the loop
First can be faster, since compiler can optimise the loop with SIMD if the operation is simple.
OR
It depends on what the operation is being performed in the loop
First can be faster, since compiler can optimise the loop with SIMD if the operation is simple.