This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Switch to disable initialization of local structures in subprogram.
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Paul van Delst <Paul dot Vandelst at noaa dot gov>, t at troutmask dot apl dot washington dot edu
- Cc: gfortran mailing list <fortran at gcc dot gnu dot org>
- Date: Wed, 28 Sep 2011 10:24:16 -0700
- Subject: Re: Switch to disable initialization of local structures in subprogram.
- References: <4E833E9E.20801@noaa.gov>
On Wed, Sep 28, 2011 at 11:34:54AM -0400, Paul van Delst wrote:
>
> The reason I'm writing this compendium is that the test where
> the above function calls are completely commented out runs
> about 3X faster compared to the test where the code is not
> commented out (but, remember, these functions are never called).
Run the two codes with a profiler (ie., the -pg option
and gprof).
If you're linking several files together see if -flto
helps.
There is also -fprofile-generate and -fprofile-use, which
is profile feedback to enable extra optimizations that
depends on well a profile of the execution.
--
Steve