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!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 04 Jul 2007 13:27:16 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Wed, 04 Jul 2007 13:27:17 -0500 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.6.140.189 X-Trace: sv3-5TVkkIyTS0jMMD2cRi5PmUO5bYiYZtPEx/dGPjeFosLG5W+rVJ8APtAb+wcRn1UI8XF0Qy+0vGnqzvm!At2k1XMmGknI72uaKJVsrOqoqjHUL51MXj319AML04nvsp1ricrK+JpOAZ27jK5NE0UvTnY+4iRH!WUQfDZgEB0P0HILIwrUFXdCN5EOd X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news1.google.com comp.lang.ada:16410 Date: 2007-07-04T13:27:17-05:00 List-Id: Using -O2 with the old gnat 3.15p on a 3GHz dual core Pentium (but only programming to use one core) under W2k, I find that the versions with B(I) := not B(I); and B(I) := B(I) xor True; take about 14 nanoseconds, while the version with One(i) := True; B := B xor One; takes about 6. With 1e9 calls, that's an 8 second difference.