index=ia(1) do i=1,n num=ia(index) index=num end do
ia(n) contains the integers 1 to n in random order, causing memory loads in random order. Because each iteration depends on the previous one, the time to complete one iteration depends on the latency in accessing the element of the array.
-- MattWalsh - 23 Feb 2004