Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Experimentation with move ordering

Author: Bruce Moreland

Date: 12:38:26 11/29/00

Go up one level in this thread


On November 29, 2000 at 02:53:42, Jeremiah Penery wrote:

>On November 28, 2000 at 23:59:14, Ed Schröder wrote:
>
>>Especially multiplies has been improved dramatically in the latest
>>generation of processors. Nowadays it is hardly an issue anymore. I
>>still use << where ever I can but I have no problems to use * so now
>>and then.
>
>It seems like compilers should produce the same assembly code for things like
>a<<1 and a*2, but of course I'm not sure if they do.  Ditto for a>>1 and a/2.
>(and also <<2 = *4, etc.)

That is called strength reduction, and any compiler will do it.  You don't have
to worry about whether to say a+a or a<<1 or a*2.  You should choose the one
that is most clear, as long as you think a sensible compiler can handle it.

bruce




This page took 0 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.