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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: Not good for Ada endorsement Date: Thu, 8 Jul 2021 18:43:42 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com> NNTP-Posting-Host: JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Content-Language: en-GB X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62358 List-Id: On 08/07/2021 18:37, Luke A. Guest wrote: > On 08/07/2021 12:12, Jeffrey R. Carter wrote: > >>> He also uses clang's -Ofast option to compile for speed over size. >> >> Going back to 64-bit integers gives 1999; with -gnatp, 2098 >> > > I've uploaded my version here > https://github.com/Lucretia/Primes/tree/add-optimised-ada/PrimeAda/solution_2 > > > It's as straight a conversion from the C++ to Ada. I intend to keep > optimising it. As a quick test, I removed the Pack attribute from the Bits array and got the following speed: debug0: Passes: 1108, Time: 5.003198, Avg: 0.004515521, Limit: 1000000, Count1: 78498, Count2: 78498, Valid: TRUE Lucretia;1108; 5.003198;algorithm=base,faithful=yes,bits=8 optimised: Passes: 3286, Time: 5.000592, Avg: 0.001521786, Limit: 1000000, Count1: 78498, Count2: 78498, Valid: TRUE Lucretia;3286; 5.000592;algorithm=base,faithful=yes,bits=8