Micro optimization in chess programming

Discussion of chess software programming and technical issues.

Moderator: Ras

Fguy64
Posts: 814
Joined: Sat May 09, 2009 4:51 pm
Location: Toronto

Re: Micro optimization in chess programming

Post by Fguy64 »

hgm wrote:This is not how CPUs work. A comparison between integers of upto 32 bits (or 64 bits if you have an x64 CPU) is always done in a single clock cycle. It does not matter if you compare for equalite, or , <, or >. If the thing you compare is the result of a previous operation, comparing it with zero might be a little bit faster, because the hardware that does the operation usually indicates if the answer is positive, zero or negative as a side effect.
OK, well that makes it kind of pointless to put much effort into this kind of thing,

Thanks,

p.s. to Dann, yes I'm aware of the Laramee series, a while back I skimmed them for ideas, but didn't study too closely. Maybe I'll give them a closer look.