[Freeciv-Dev] Re: [Patch] Bool cleanup of options.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Mar 18, 2002 at 10:59:31AM -0600, Tony Stuckey wrote:
> 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)
I haven't found any extra instructions on Alpha. But it hard since gcc
assign registers differently and causes so a lot of noise.
> > > 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.
AFAIK this depends more on the ABI than on the compiler. Althought the
compiler can add extra padding.
"On the eigth day, God started debugging"