Computer Chess Club Archives


Search

Terms

Messages

Subject: question about optimizing

Author: Uri Blass

Date: 20:04:04 07/10/03


I have in movei cases when I have 2 lines like the following when s can be only
0 or 1 and 128 can be every power of 2 that is less than 2^16

directsee[target]|=(128<<(s<<4));
directsee[target]&=~(128<<((1^s)<<4));

My question is if there is a way to optimize it.

There are also case when I know s and may have something like the following:

directsee[target]|=64;
directsee[target]&=~(64<<16);

I do not know if there is a way to do it faster(I expect a smart compiler to
optimize it by itself).

Uri



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.