On 05/08/2015 09:00 AM, address@hidden wrote:
Subject:
Minor question about optimization flags in ./configure
From:
José Luis García Pallero <address@hidden>
Date:
05/08/2015 07:45 AM
To:
Octave Maintainers <address@hidden>
List-Post:
<mailto:address@hidden>
Content-Transfer-Encoding:
quoted-printable
Precedence:
list
MIME-Version:
1.0
Message-ID:
<address@hidden>
Content-Type:
text/plain; charset=ISO-8859-1
Message:
1
Hello:
I've seen (octave 4.0.0 rc4) that after the ./configure step, the
C/C++ compiling order contains the -O2 optimization flags but the
Fortran one contains only the -O. Is there any reason in order to not
use the -O2 flag in Fortran by default?
I think originally there may have been. For some platforms there wasn't
actually a Fortran compiler, rather there was only a Fortran-to-C
translator and then the C code was compiled. In that case it was easier
for the C compiler to perform optimization if the input code was
relatively straightforward and had not already been optimized.
But, I would say that this situation has now passed. Most
distributions, including our MXE distribution for Windows, use gfortran
and it accepts -O2. I know that I, personally, have been using -O2 in
FFLAGS for several years and never had a problem.
I think if jwe is okay with it then we should change the default
optimization flags on the development branch.