From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation
Date: Tue, 03 Jul 2007 18:36:31 GMT
Date: 2007-07-03T18:36:31+00:00 [thread overview]
Message-ID: <PGwii.192991$_c5.68933@attbi_s22> (raw)
In-Reply-To: <1183485842.725620.199490@w5g2000hsg.googlegroups.com>
Alinabi wrote:
>
> Now, concerning efficiency: these basic operations on bitboards
> are used 1e8 to 1e9 times every time the program tries to decide
> what to move next. Even the smallest improvement in speed can
> mean the difference between searching 10 or 11 ply deep, which
> can mean an improvement of over 50 Elo points in strength.
I'm sure that's true. However, you have not demonstrated that there's a
speed difference between the 2 versions. Even if there is, it doesn't
necessarily mean that there will be a difference in the # of plys that
can be searched. The old rule, "1st get it right, then make it fast,"
still applies. Once you have it finished you can easily see if modifying
this single procedure actually makes a difference. Until then, you're
wasting a lot of effort on something you don't know is important.
You should also be aware that you're sending the compiler conflicting
messages. Packing the array indicates that you want the compiler to
minimize storage, even at the expense of speed, while "pragma Optimize
(Time);" indicates that you want to minimize time, even at the expense
of storage. Obtaining speed often requires wasting storage; the fastest
implementation might be to not pack the array. I don't know how many of
these you have, but with the large memories on modern machines, you
might be better off with the additional 56 bytes per array. Again, you
won't know for sure until you have a working version you can measure.
--
Jeff Carter
"Gentlemen, you can't fight in here. This is the War Room!"
Dr. Strangelove
30
next prev parent reply other threads:[~2007-07-03 18:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 19:34 sub-optimal code for packed boolean arrays -- bug or inherent limitation Alinabi
2007-07-02 20:08 ` Ludovic Brenta
2007-07-03 1:01 ` Jeffrey R. Carter
2007-07-03 7:22 ` Harald Korneliussen
2007-07-03 8:37 ` Georg Bauhaus
2007-07-03 7:59 ` gautier_niouzes
2007-07-03 9:25 ` Stefan Lucks
2007-07-03 12:40 ` Stefan Lucks
2007-07-03 15:42 ` Adam Beneschan
2007-07-03 18:04 ` Alinabi
2007-07-03 18:09 ` Alinabi
2007-07-03 18:17 ` Alinabi
2007-07-10 2:06 ` Randy Brukardt
2007-07-03 18:36 ` Jeffrey R. Carter [this message]
2007-07-03 19:42 ` Alinabi
2007-07-04 1:12 ` Jeffrey R. Carter
2007-07-04 10:15 ` Jeffrey Creem
2007-07-04 18:28 ` Jeffrey R. Carter
2007-07-04 3:22 ` Steve
2007-07-04 6:31 ` Harald Korneliussen
2007-07-08 22:53 ` Robert A Duff
2007-07-09 6:09 ` tmoran
2007-07-04 9:00 ` Jean-Pierre Rosen
2007-07-04 18:27 ` tmoran
2007-07-04 19:16 ` Pascal Obry
2007-07-05 1:45 ` tmoran
2007-07-05 4:53 ` Jeffrey R. Carter
2007-07-04 18:51 ` tmoran
2007-07-08 22:58 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox