Optimization of gfortran for execution speed
Feng Wang
wf_cs@yahoo.com
Wed Nov 2 07:11:00 GMT 2005
--- Richard Henderson <rth@twiddle.net> wrote:
> On Thu, Oct 20, 2005 at 12:15:05PM -0400, Andrew Pinski wrote:
> > A way to speed/fixing this up, is to make struct array1_real4 for each
> > array
> > at the beginning of the function, even though they might not be used.
> > You should be able to let DCE do its job of cleanuping up unused
> > structs.
>
> More than that: if the array is SAVEd (or other Fortran words that
> mean it's in static storage), the descriptor can be static as well,
> and reside in read-only memory.
>
But the initialization still remains in the loop, especially invoking malloc()
and free() functions, which are the main cost.
Best Regards,
Feng Wang
--
Creative Compiler Research Group,
National University of Defense Technology, China.
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 1GB free storage!
http://sg.whatsnew.mail.yahoo.com
More information about the Fortran
mailing list