Re: ELEMENTAL functions and performance
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Thu, 31 Jul 2008 01:28:27 GMT
John Harper wrote:
In article <f833019e-602e-4340-9baa-69d753521b35@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
deltaquattro <deltaquattro@xxxxxxxxx> wrote:
Hi,...
I would like to know if the attribute ELEMENTAL for a function/
subroutine can negatively affect performance or not.
However, sometimes I heard that some "new" features of the language
may have an hit on performance, because they make optimization more
difficult for the compiler. I don't know if this is the case with
ELEMENTAL, however these functions will be called a lot of times, so
it's not a good idea if they are slow. The code will run on parallel
vectorial supercomputers. According to these informations, what would
you suggest me to do?
Try it both ways with a test program, and tell us which is better on
the machine(s) and compiler(s) you used.
-- John Harper, School of Mathematics, Statistics and Computer Science, Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@xxxxxxxxx phone (+64)(4)463 6780 fax (+64)(4)463 5045
The problem with "functions" is that they can be big or little.
For big ones, calling sequence details tend not to be
important. For little ones, calling sequence time can dominate
function execution time.
So, there's two things to try. Search out the compilers options
for inlining and try it with and without inlining, for computationally
intensive functions and for simple ones.
I think your original post said you were making a package for
others to use. If so, will they be able to compile the package,
or will you give them precompiled .obj and .mod files? They
probably can't get inining with a precompiled versions; having
to recompile your code every time to get the benefit of inlining
is a pain.
*** Hendrickson
.
- Follow-Ups:
- Re: ELEMENTAL functions and performance
- From: Gary Scott
- Re: ELEMENTAL functions and performance
- References:
- Re: ELEMENTAL functions and performance
- From: John Harper
- Re: ELEMENTAL functions and performance
- Prev by Date: new Sun Studio Express release
- Next by Date: Re: ELEMENTAL functions and performance
- Previous by thread: Re: ELEMENTAL functions and performance
- Next by thread: Re: ELEMENTAL functions and performance
- Index(es):