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=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Not good for Ada endorsement Date: Thu, 15 Jul 2021 17:56:31 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com> <0e6ee3e9-baad-47b3-872b-90ec6c735920n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 15 Jul 2021 15:56:38 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="05d073167f8af91634ee01bea1feaa70"; logging-data="24374"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Dn523aQYBKL10WIZ5HUUpM0zqOKRzX64=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cancel-Lock: sha1:bGII1Cj3LmdlJnXywLqYjx47kE8= In-Reply-To: <0e6ee3e9-baad-47b3-872b-90ec6c735920n@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:62391 List-Id: 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. -- Jeff Carter "How'd you like to hide the egg and gurgitate a few saucers of mocha java?" Never Give a Sucker an Even Break 101