This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Switch to disable initialization of local structures in subprogram.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]