On Thu, 17 Jun 2010, Gautier sent: |--------------------------------------------------------------------| |"On Jun 10, 5:48 pm, Colin Paul Gloster | |wrote: | | | |> Additionally, loop unrolling should be considered. | | | |Just a note for those who are not aware of and who'd be tempted to | |unroll loops by hand: compilers are able to unroll loops themselves.| |For instance GNAT has a -funroll-loops for a long time (and also - | |fpeel-loops and -funswitch-loops)." | |--------------------------------------------------------------------| It is possible to obtain better performance by both manually unrolling and having a compiler unroll for you at the same, instead of by relying on just a compiler or just manual unrolling. See for example "Computer Architecture: A Quantitative Approach" (in which manual unrolling was called "symbolic loop unrolling"). Sincerely, Colin Paul Gloster