From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:4741:: with SMTP id k1mr4776203qtp.374.1626366591198; Thu, 15 Jul 2021 09:29:51 -0700 (PDT) X-Received: by 2002:a25:ac9a:: with SMTP id x26mr6832014ybi.161.1626366591004; Thu, 15 Jul 2021 09:29:51 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 15 Jul 2021 09:29:50 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=149.32.224.40; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.40 References: <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com> <0e6ee3e9-baad-47b3-872b-90ec6c735920n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <73f3c6be-8de5-4ad7-a420-d33866d3c87bn@googlegroups.com> Subject: Re: Not good for Ada endorsement From: Anh Vo Injection-Date: Thu, 15 Jul 2021 16:29:51 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62392 List-Id: On Thursday, July 15, 2021 at 8:56:40 AM UTC-7, Jeffrey R. Carter wrote: > On 7/15/21 5:13 PM, Lucretia wrote: > > > > I managed to get just under 4000 passes with a 1 bit array, but not using Ada's packed array. That's actually the slowest method, strangely. > So you have an array of a modular type, calculate an index and bit within it, > mask out that bit, and compare it to zero? I would have thought an unpacked > array of Boolean would be fastest. > > A packed array of Boolean requires all the operations above, plus shifting the > bit to the LSB and treating the result as a Boolean, so it may not be that > surprising that it's slower. Should fixed lower bound index array (-gnatX) speed it up? Anh Vo