On Thu, 10 Jun 2010, Ludovic Brenta sent: |---------------------------------------------------------------------| |"On Jun 10, 5:48 pm, Colin Paul Gloster | |wrote: | |> On Wed, 9 Jun 2010, Ludovic Brenta sent: | |> | |> |     Two_Pi_Over_N : constant := 2 * Pi / N;| | |> | |> That is a good suggestion. | |> | |> |"     FOR k in X'range LOOP"                | | |> | |> No. | | | |Why? | | | |> |"         FOR m in data'range LOOP          | | |> | |> No. Loop down to zero. | | | |Why?" | |---------------------------------------------------------------------| Though there should be no difference, in reality compilers produce less slow machine code when looping down to zero instead of up from zero. |---------------------------------------------------------------------| |"[..] | | | |> Additionally, loop unrolling should be considered. | | | |I agree with this but the solution would be less general." | |---------------------------------------------------------------------| True. Complementing Mathematica with Ada does not indicate that the source code in Ada is supposed to be general instead of fast. The strides in those loops are really indicative that the loops could be worth unrolling or running concurrently.