Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] Re: Profiling Freeciv.
Home

[Freeciv-Dev] Re: Profiling Freeciv.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Freeciv.
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: 05 Jan 2001 18:00:10 +0100

On 05 Jan 2001, falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
> Gaute B Strokkenes <gs234@xxxxxxxxx> writes:
> 
>> An alternative is to use inline functions which are much more
>> portable and have a clean fall-back if they're not available.
>> However, the `an inline function is as fast as a macro' maxim isn't
>> always entirely true, notably under GCC.
> 
> Hm, the gcc manual even explicitely says "An Inline Function is As
> Fast As a Macro".

What they really mean is `An Inline Function _Should_ be As Fast As a
Macro, But We Haven't Quite Gotten Round To It Yet'.

> Could you give an example where this is not the
> case? (except of course the function code not being in the header
> file)

Sorry.  However, have a look at 

http://gcc.gnu.org/ml/gcc/1999-12n/msg00444.html

and the surrounding discussion.  Notice that this happened after
2.95.2 was released, see

http://gcc.gnu.org/news/inlining.html
http://gcc.gnu.org/news.html

As far as I can see, this new inlining support has not been adapted to
the C front-end yet, so not even Red Hat 7 users will benefit...  (I
didn't dig through all the changelogs etc. to make completely certain,
though.)

Also,

http://gcc.gnu.org/ml/gcc-bugs/1998-09/msg00693.html

might give you the example you're looking for, though it may be fixed
by now.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
I'm in DISGUISE as a BAGGAGE CHECKER....I can watch the house, if it's
 ORANGE...



[Prev in Thread] Current Thread [Next in Thread]