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!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation Date: Sun, 08 Jul 2007 18:58:43 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1183404856.375083.160890@q69g2000hsb.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1183935523 16493 192.74.137.71 (8 Jul 2007 22:58:43 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 8 Jul 2007 22:58:43 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:qdnsno3TP5yChYoVIhdpjL0Umbo= Xref: g2news1.google.com comp.lang.ada:16432 Date: 2007-07-08T18:58:43-04:00 List-Id: Alinabi writes: > I don't know much (if anything) about compiler internals, so I was > wondering if I should file a bug report. Well, it's not quite a bug, but there's no harm in sending an "enhancement request" to AdaCore. We might do something about it. I would like to see operations on packed arrays of Booleans be as efficient as similar operations on modular/unsigned integers. >... Is there some good > theoretical justification for all that extraneous shifts and > rotations? I would think that if the compiler can figure out the best > way to set or clear a bit in a register using shift and logical ops, > than it should also be able to negate it efficiently. Yes, it could. - Bob