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:04:50 +0100

On 05 Jan 2001, falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
> Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx> writes:
> 
>> On Thu, Jan 04, 2001 at 08:20:15PM +0100, Thue wrote:
>> > Converting small functions into macros is ok, but generelly
>> > optimizations don't have to be very ugly before I don't think it
>> > is justified for performance IMO. Most people have a better
>> > processor than a 4x68.  (and those people who do have a 4x86
>> > shouldn't play 15 AI games on 160x90 maps). On your system an AI
>> > turn took15 minutes, on my celeron 400 it took 1 minute. And
>> > people will continue to get faster systems.
>> 
>>      One major adavantage of macro conversion is that GCC
>> doesn't do cross-procedural optimization, nor cross-source-file
>> inlining of small functions.  Making "one-line" simple functions
>> macros instead removes both of these restrictions.
> 
> Putting these "one-liners" marked as inline into header files has
> exactly the same effect,

...almost... (see my other reply)

> without the dangerous semantic traps of macros.

Note that Freeciv already contains a fair number of such `unhygienic'
macros.  My personal opinion is that unhygienic macros are ok, _if_
they upper-case names so that you're explicitly reminded of this fact
whenever you use them.  (Off course, the macros I'm talking about have
all lower-case names.  I think this a Bad Idea(tm), but there you
are.)

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
BEEP-BEEP!!  I'm a '49 STUDEBAKER!!



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