Hi: I was a bit surprised that the code
if (a(i) > maxi) then
maxi = a(i)
is faster than
maxi = maxval(a)
where maxval is an intrinsic function (is 10% slower).
Is it possible and there is a meaningful reason for such unexpected behavior?