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

[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: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] Bool cleanup of options.c
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Mar 2002 11:26:35 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Mar 06, 2002 at 10:58:38PM +0100, Raimar Falke wrote:
> This and the next patch about stdinhand.c are the last ones. Then it
> should for example be safe to change the type of bool from int to
> char. I'm anxious to know which one is faster.

Results from _one_ _small_ auto game:
  user    6m9.240s
  user    6m8.160s

 - the instructions working with bytes may be faster (I'm not an i386
 - the compiler has to insert instructions which extend a value from 1
 byte to 4 bytes
 - the char variant should reduce the memory foot print and so cache
 misses (I see this as the major advantage for char) However this may
 be destroyed if gcc padds structs. Only bool[] should really see

Just for the records I have added the diff between map.c compiled with
char and int.


 email: rf13@xxxxxxxxxxxxxxxxx
 "Life is too short for reboots."

Attachment: map.s.diff
Description: Text document

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