On Tue, Oct 15, 2013 at 4:58 PM, Igor Zamyatin <izamya...@gmail.com> wrote:
> Hi All!
>
> Is there any particular reason that matmul* modules from libgfortran
> are compiled with -O2 -ftree-vectorize?

Yes, testing showed that it improved performance compared to the
default options. See the thread starting at

http://gcc.gnu.org/ml/fortran/2005-11/msg00366.html

In the almost 8 years (!!) since the patch was merged, I believe the
importance of vectorization for utilizing current processors has only
increased.

[snip]

> Why not just use O3 for those modules?

Back when the change was made, -ftree-vectorize wasn't enabled by -O3.
IIRC I did some tests, and -O3 didn't really improve things beyond
what "-O2 -funroll-loops -ftree-vectorize" already did. That was a
while ago however, so if somebody (*wink*) would care to redo the
benchmarks things might look different with today's GCC on today's
hardware.

Hope this helps,

-- 
Janne Blomqvist

Reply via email to