From: Dave Gilbert <gilbertd@treblig.org>
To: axp-list@redhat.com
Subject: Function call oddity
Date: Sun, 12 Jul 1998 19:56:33 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.3.96.980712195410.526F-100000@tardis.home.dave> (raw)
While trying to really optimise a piece of my code I noticed the following
oddity; build a loop which calls a function many times, make sure the
compiler can't inline the function by placing it after the point of
calling.
If the function has no parameters and no results then this runs
faster than all other cases (expected).
However if the routine has one parameter and a result
then it runs faster than a similar routine without a parameter!!
This is really unexpected to me; by the look of the code it must be
to do with allocation of space on the stack at a guess - wierd!!
parameter no param
result 6 6.79
no res 5.28 4.53
Dave
--------------------------------------------------------------------
/ Dr. David Alan Gilbert | Running Linux on Alpha & ARM \
\ gro.gilbert @ treblig.org | ------- Happy in hex ------- /
\____________________________|___ http://www.treblig.demon.co.uk __/
next reply other threads:[~1998-07-12 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-12 18:56 Dave Gilbert [this message]
1998-07-13 1:06 ` Function call oddity Quant-X Alpha Linux Support
1998-07-13 4:43 ` Richard Henderson
1998-07-13 5:32 ` Quant-X Alpha Linux Support
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox