The second will be faster since many fewer comparisons. -- The compare is outside the loop rather than inside.
And since the comparison variable is a loop invariant, I'd be surprised if it wasn't also clearer coding.
Actual speed difference (wall clock time) depends on size of the array