Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [Patch] Bool cleanup of options.c
Home

[Freeciv-Dev] Re: [Patch] Bool cleanup of options.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] Bool cleanup of options.c
From: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Date: Mon, 18 Mar 2002 10:59:31 -0600

On Mon, Mar 18, 2002 at 08:48:53AM +0100, Raimar Falke wrote:
> On Sun, Mar 17, 2002 at 10:13:54PM -0500, Ross W. Wetmore wrote:
> > Is it even noticeable, or do the extra code instructions to handle
> > bytes swamp the data memory savings for anything but a bool[]?
> 
> What extra code instructions?

        These will certainly be present on Alpha architectures.  While I
don't know anything about ARM and some other chips, I don't think that
x86, M68K, or Sparc will have any issues at all.  (Other that Raimar's
noted occasional sign-extend at function return for ABI reasons)

> > Also, memory access is actually optimized for word or word multiples. If
> > random bytes cause other accesses to cross these boundaries, you lose in
> > a big way.
> 
> Quite possible.

        GCC should pad out to reasonable alignments, other compilers might
or might not.
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
        -Robyn Hitchcock.


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