From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5ff6e0c3de8331c0 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation Date: Wed, 04 Jul 2007 11:00:18 +0200 Organization: Adalog Message-ID: References: <1183404856.375083.160890@q69g2000hsb.googlegroups.com> <1183485842.725620.199490@w5g2000hsg.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1183539658 3796 195.25.228.57 (4 Jul 2007 09:00:58 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 4 Jul 2007 09:00:58 +0000 (UTC) User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) In-Reply-To: <1183485842.725620.199490@w5g2000hsg.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:16407 Date: 2007-07-04T11:00:18+02:00 List-Id: Alinabi a �crit : > While I used to be a candidate master > once upon a time, I do not play at that strength anymore and I > could benefit from the advice of a strong player (who might not > be a programmer). For such a person B(i) := not B(i) is much > easier to understand than B := B xor Bitborad_T(Shift_Left(1, > i)). Hmmm... that person will look at "Flip (B(I))", not at the details of the Flip function. Therefore, you should use whatever implementation is most efficient. But do not forget to make measurements, efficiency issues are often... surprising to say the least. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr