On 5/17/07, Andy Dougherty <[EMAIL PROTECTED]> wrote:

On Wed, 16 May 2007, jerry gay wrote:

> good comments... but why keep both function and macro? which would you
> prefer keeping over the other, and why? i can't understand why both
> exist.

In src/debug.c, for handling user input, I don't see any particular
advantage to the macro version.  The function version is easier to debug
with a debugger (should that ever be necessary), makes for a (possibly)
smaller object file, and can be inlined by a smart optimizing compiler
anyway.  For such a trivial function, these are all rather trivial
differences, but you still might as well get rid of the macro.


Yes, I totally agree. A macro might be nice for simple one-liners that are
called so often that a function would really slow things down. But then it
would need to be called VERY often, before you notice anything on machines
nowadays.

kjs

--
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to