Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Map coordinate cleanups.
Home

[Freeciv-Dev] Re: Map coordinate cleanups.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kevin Brown <kevin@xxxxxxxxxxxxxx>
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 08:36:35 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Aug 19, 2001 at 04:22:45PM -0700, Kevin Brown wrote:
> Ross W. Wetmore <rwetmore@xxxxxxxxxxxx> wrote:
> > At 03:24 PM 01/08/19 -0700, Kevin Brown wrote:
> > >Ross W. Wetmore <rwetmore@xxxxxxxxxxxx> wrote:
> > >> The total run times for an exactly identical game show an overall
> > >> 25% cost (9 min vs 12 min) for functions over macros for a small
> > >> set of the common ones. One could probably refine this by playing
> > >> with the set to see which were the key ones.
> > >
> > >Hmm...yes, but is this for *regular* function calls or for *inline*
> > >ones?  That's what really needs to be tested, though inline functions
> > >might not be available on some of the platforms that would likely be
> > >most affected by these things (the Amiga, in particular)...
> > 
> > I would not expect any significant difference between inline functions
> > and macros. I think the issues here are of style and compatibility. 
> > 
> > Macros do work everywhere, inlined functions may not. 
> 
> This is something we *really* need to know.  Obviously, any platform
> with gcc automatically gets inlined functions, so what remains are
> those platforms that don't have it.  Of those, some will have inlined
> functions but will have different ways of specifying them.  That's
> what configure's for (then, of course, there are some platforms that
> configure won't run on, right?  :-).
> 
> So what platforms don't have inline functions and don't have gcc,
> either?  And do we even target any of them?
> 
> > There are some
> > advantages to using inlined functions as they don't have quite the set
> > of restrictions that macros do. There is less subjective noise in 
> > arriving at suitable names for inlined functions, etc.
> 
> Right.  And they allow the compiler to do type checking (so if you
> *don't* want type checking, then a macro is the way to go), and they
> don't have that annoying continuation mark requirement (for multiline
> macros, which is what I'm concerned about anyway), etc., etc.
> 
> If all the platforms we care about can handle inline functions, then
> it becomes a matter of selecting the right tool (macro or inline
> function) for the job, which is exactly the way I like it.
> 
> Are there any platforms we target that we know *for sure* can't handle
> inline functions?  I thought, for instance, that even the Amiga has an
> implementation of gcc available for it...

I used some old version of gcc on a Amiga500. The machine had 3MB and
to use gcc you have use the CLI (no workbench) to get this memory
hungry beast to compile even a simple hello world program.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "#!/usr/bin/perl -w
  if ( `date +%w` != 1 ) {
    die "This script only works on Mondays." ;
  }"
    -- from chkars.pl by Cornelius Krasel in de.comp.os.linux.misc


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