Re: inline and macro
From: Lucas Galfaso (lgalfaso_at_NO_CAPSfd.com.ar)
Date: 02/22/04
- Next message: Bonj: "Tray icon's menu"
- Previous message: Azzeddine Saadi: "RE: Fatal Error C1063"
- In reply to: Nelson: "inline and macro"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 22 Feb 2004 15:30:37 -0300
Hi, inline fuctions (if inlined) and macros shoud be equally fast (actually,
produce the same code.)
I prefer inline functions to macros, because macros polute the global
namespace (at least, until #region is aproved)
The compiler may or may not inline a function declared inline. ie if you
have a recursive inline function, it will not be inlined.
Be aware that some (very odd) cases that inline functions are slower that
not inlined ones exists.
Lucas/
"Nelson" <doomer999@hotmail.com> wrote in message
news:e3xXGIV%23DHA.1456@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> Are inline functions or macros faster? I want to know because I'm writing
a
> fast graphics library and I found that the overhead of calling functions
> reduces speed significantly. So the only solutions I can think of are
inline
> functions and macros.
>
> Also, I heard from someone that the compiler may not insert the code in
the
> inline function into the function caller. Is that true? In what situation
> would that happen?
>
> Thanks,
> Nelson
>
>
- Next message: Bonj: "Tray icon's menu"
- Previous message: Azzeddine Saadi: "RE: Fatal Error C1063"
- In reply to: Nelson: "inline and macro"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|