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!news1.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: Mon, 09 Jul 2007 01:09:43 -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: Mon, 09 Jul 2007 01:09:43 -0500 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.6.140.189 X-Trace: sv3-E2GpZIzT6/EWR7Mdh02z2YT1GEabePBMPuZe7fZUo5LaChfQBoAzLc9y0RX00UKxqDpin5tIDgbT1FW!JkOFfSBTfwWrh1HL6njj3+YxtPbK//JBoBd7Nl2wCFqt0667kdn6kdDwbutxa2oWmwVN7HJI7eIM!gzHsuK7jECIH8LB+8ABbAQp3yvxj 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:16434 Date: 2007-07-09T01:09:43-05:00 List-Id: > Well, sort of. Pack means to minimize storage even at the (possible) > expense of speed of accessing the components. Speed overall can be > improved by packing. For example, speed of copying and comparing the > ... > Measurement is a Good Thing. In my benchmark runs, the B(I) := not B(I); and B(I) := B(I) xor True; versions went from 10 down to 7 nanoseconds when I removed the pragma pack, but the version with One(i) := True; B := B xor One; went from 5 to 700 nanoseconds.