Re: [Freeciv-Dev] Some performance issues
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
|
|