+ 1
Let the compiler do its job and optimize your loops, just use the type that makes your code easiest to understand.
13th Dec 2016, 8:05 AM
Kerrash
Kerrash - avatar
0
All loops are roughly equivlent performance wise. The type you choose is really up to you and the task you are trying to achieve.
13th Dec 2016, 7:56 AM
Kerrash
Kerrash - avatar
0
If you really want to look at the most optimal looping, you will have to consider hand optimizing by unrolling the operations
13th Dec 2016, 8:07 AM
Kerrash
Kerrash - avatar
0
use while loop when you dont know how many times the loop will occur.. use for loops when u know the amount of times the loop will occur.
13th Dec 2016, 8:48 AM
𝐹𝓇𝒶𝓃𝓀𝓎 𝐵𝓇𝒶𝒾𝓃𝐵𝑜𝓍
𝐹𝓇𝒶𝓃𝓀𝓎 𝐵𝓇𝒶𝒾𝓃𝐵𝑜𝓍 - avatar
0
Use for loop because it reduces lines of code
13th Dec 2016, 9:58 PM
Decodeworms Olamilekan
Decodeworms Olamilekan - avatar