Efficiency of iteration over arrays?
more ...Which one of these three loops is the most efficient? How can I prove the answer?
I've listed the source code below. The three loops are:
::: {.MsoNormal} Foreach over an int array :::
::: {.MsoNormal} Simple for over an int array :::
::: {.MsoNormal} For over an int array, hoisting out the length value …