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.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:4089:: with SMTP id f9mr5353156qko.441.1627059853013; Fri, 23 Jul 2021 10:04:13 -0700 (PDT) X-Received: by 2002:a25:c7d1:: with SMTP id w200mr5708548ybe.161.1627059852865; Fri, 23 Jul 2021 10:04:12 -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: Fri, 23 Jul 2021 10:04:12 -0700 (PDT) In-Reply-To: <73f3c6be-8de5-4ad7-a420-d33866d3c87bn@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=67.164.24.162; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 67.164.24.162 References: <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com> <0e6ee3e9-baad-47b3-872b-90ec6c735920n@googlegroups.com> <73f3c6be-8de5-4ad7-a420-d33866d3c87bn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Not good for Ada endorsement From: Anh Vo Injection-Date: Fri, 23 Jul 2021 17:04:13 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62422 List-Id: On Thursday, July 15, 2021 at 9:29:52 AM UTC-7, Anh Vo wrote: > 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? Indeed, it does. As posted on Reddit Ada, I got 5476 Passes after changing array types to arrays having fixed lower bound index of 0 on lines 9 and 10 and compiling it using switch -gnatX -02. By the way, I used GNAT Studio 2021 running on Windows 10.