Board index » delphi » Function Call Overheads

Function Call Overheads

Is anyone aware of a Delphi equivalent to C++ inline directive?

        I am doing a series of computationally intensive CAD calculations and
am concerned that the function call overhead is significant. Is it worth
worrying about?

 

Re:Function Call Overheads


On Mon, 05 May 1997 15:48:28 +1100, John Webb

Quote
<dd...@hunterlink.net.au> wrote:
>Is anyone aware of a Delphi equivalent to C++ inline directive?

>    I am doing a series of computationally intensive CAD calculations and
>am concerned that the function call overhead is significant. Is it worth
>worrying about?

You can write inline assembler code, but Delphi has no equivalent to
the C++ inline directive. Remember that inline is just a hint to the
compiler, and you have no guarantee that a given compiler will
actually compile a function inline.

As with any programming effort, first make it work; then make it work
faster. If function call overhead turns out to be a problem, you can
inline the functions manually, or you can switch to a better
optimizer, such as writing a separate DLL for the compute intensive
parts and compiling them with Watcom or some other super-optimized
compiler.
--
Ray Lischner            
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

Other Threads