[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA))
From: |
Trevor Morris |
Subject: |
Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA)) |
Date: |
Fri, 06 Sep 2002 16:11:53 -0400 |
At 07:04 PM 9/3/2002 +0200, Arend Bayer wrote:
>On Tue, 3 Sep 2002, Marco Scheurer wrote:
>
>> Speaking of micro optimizations and speed/space trade offs, I've been
>> wondering...
>
>I've been wondering about using inline. I guess all compilers that we
>care much about support inline as an extension. Hence we could write
>a configure test to define HAVE_INLINE or s.th. (similar to
>HAVE_VARIADIC_...), and then do
>
>Thoughts?
>(The GCC manual suggests using __inline__ for ANSI-conformant use of
>inline. I have no idea how portable that would be.)
I'm all in favor of replacing the macros w/ GG_INLINE function calls.
Note, however, for Microsoft VC++:
The compiler cannot inline a function if:
* The function has a variable argument list.
* The program takes the address of the function.
In particular, replacing the TRACE macros w/ inline functions is
probably not a good idea.
Though, I believe the following construct may work for the TRACE
macros on all platforms:
#define TRACE (!verbose) ? (void)0 : gprintf
(Originally suggested by Dave Denholm in:
http://mail.gnu.org/pipermail/gnugo-devel/2002-February/001511.html )
-Trevor
- Re: [gnugo-devel] engine/influence.c (and DFA), (continued)
- Re: [gnugo-devel] engine/influence.c (and DFA), Dave Denholm, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Arend Bayer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Marco Scheurer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Gunnar Farneback, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Dave Denholm, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Heikki Levanto, 2002/09/03
- HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA)), Arend Bayer, 2002/09/03
- Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA)), Marco Scheurer, 2002/09/03
- Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA)), Arend Bayer, 2002/09/03
- Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA)), Marco Scheurer, 2002/09/03
- Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA)),
Trevor Morris <=
- Re: [gnugo-devel] engine/influence.c (and DFA), Dave Denholm, 2002/09/03
Re: [gnugo-devel] engine/influence.c (and DFA), Gunnar Farneback, 2002/09/03