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-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!switch.ch!news.belwue.de!th!lucks From: Stefan Lucks Newsgroups: comp.lang.ada Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation Date: Tue, 3 Jul 2007 11:25:50 +0200 Organization: InterNetNews at News.BelWue.DE (Stuttgart, Germany) Message-ID: References: <1183404856.375083.160890@q69g2000hsb.googlegroups.com> NNTP-Posting-Host: th.informatik.uni-mannheim.de Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: news.belwue.de 1183454752 5878 134.155.91.85 (3 Jul 2007 09:25:52 GMT) X-Complaints-To: news@news.belwue.de NNTP-Posting-Date: Tue, 3 Jul 2007 09:25:52 +0000 (UTC) In-Reply-To: <1183404856.375083.160890@q69g2000hsb.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:16393 Date: 2007-07-03T11:25:50+02:00 List-Id: As Clear, internally using XOR, is optimised well, have you tried to rewrite Flip using XOR for bit-flipping, e.g., as follows: procedure Flip(B : in out Bitboard_T; I : in Index_T) is One: constant Bitborard := (others => True); begin B(i) := B(i) xor One; end; (Even though the optimiser appararently could be improved here -- I would not consider this a bug, it is more like a missing feature -- this might perhaps solve your current problem without having to use inline-assembly.) -- Stefan Lucks (moved to Bauhaus-University Weimar, Germany) ------ I love the taste of Cryptanalysis in the morning! ------