Complete.Org: Mailing Lists: Archives: freeciv-dev: April 1999:
Re: [Freeciv-Dev] Some performance issues
Home

Re: [Freeciv-Dev] Some performance issues

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Rizos Sakellariou <rizos@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Some performance issues
From: Fabrice Noilhan <Fabrice.Noilhan@xxxxxx>
Date: Wed, 21 Apr 1999 10:00:44 +0200

On Mon, Apr 19, 1999 at 06:04:12PM -0500, Rizos Sakellariou wrote:
> > Now, it's up to you to decide if you want portability (in case you can
> > just leave these multiplications), efficiency (in case you can define
> > a macro for doing these multiplications) or use the not-most-efficient-but-
> > cool-on-all-processors solution (lookup table).
> 
> Ok - let's get some things straight:
> - Portability is defined as whether your code can be easily compiled
>   and run on different architectures. Changing  y * map.xsize  with
>   something like  yoffset[y] for instance is not a machine dependent
>   operation and has nothing to do with portability.

Of course, but if you only want portability, then you needn't change
all those multiplications.

> - Efficiency is associated with the performance of the code which 
>   results from the code that the compiler generates. In the particular 
>   case, there is scope of replacing a generally expensive multiplication 
>   with a not so expensive load.

Of course, that was my point... See the name of the last solution!

        Fabrice

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