Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays
Home

[Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Ross Wetmore <rwetmore@xxxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays
From: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Tue, 28 Oct 2003 12:47:49 +0100

On Thu, Oct 23, 2003 at 11:42:38AM -0400, Ross Wetmore wrote:
> 
> There is absolutely no difference in optimized code between an
> array and a linear implementation - 

> provided you make sure the "variable" used in multiplication is
> "constant" for the code block in question.

IMHO it has to be a compile-time constant. If it is a compile-time
constant the 1D is the fastest but may waste memory (and so cache
lines).

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Q:  Do you know what the death rate around here is?
 A:  One per person.


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