Can be a subroutine slower when is placed in a module?

Dominique d'Humières dominiq@lps.ens.fr
Sat Feb 20 13:19:00 GMT 2016


You should give the options you use. If I compile your code using a module with '-Ofast -fwhole-program’ I get the same speed as for the other two tests compiled with '-Ofast’ only. IMO this is related to inlining the routine(s).

Dominique



More information about the Fortran mailing list