Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [Patch] Small patch
Home

[Freeciv-Dev] Re: [Patch] Small patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Zach Garner <zach@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Small patch
From: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Date: Sun, 10 Feb 2002 14:04:36 -0500 (EST)

On 10 Feb 2002, Zach Garner wrote:

> > performance issue: are you sure (map.xsize%2 ? 0 : 1) gets optimized?
> > or maybe we can write (map.xsize & 1) to make sure about it?
> 
> I'm 99% sure gcc will optimize xsize%2.
> 

But does it optimize to (xsize&1)?0:1  or to (!(xsize&1)) ?  Both parts
matter.

I suspect gcc does the second, but does anybody feel like checking?


--Daniel Speyer
"May the /src be with you, always"



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