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 09:52:19 +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:62352 List-Id: On 08/07/2021 09:20, Jeffrey R. Carter wrote: > On 7/8/21 5:46 AM, Richard Iswara wrote: >> Indirectly it is a comparison of implementation and tools >> benchmarking. Looking at the gpr file, there is no compile switch >> used, not even an "-o2" switch. I did wonder about that as I haven't got around to looking through it yet. > Compiling with -gnatp -O3 would undoubtedly speed it up (suppressing > checks is justified since execution with checks active shows that no > checks fail). I got nothing from the output of trying to run just the Ada version. > Looking casually at the code, the map could be replaced by a constant, > as Sieve_Size is hard coded to 1,000,000, and the filling of the map is > included in the timing. The calculation of the square root of 1,000,000 > could be replaced by a constant. The array of Boolean could be > constrained to 3 .. Sieve_Size. The function that simply returns (others > => True) could be replaced by the aggregate, though optimization will > probably do that. Long_Long_Integer could be replaced by a type with > range 0 .. 2 ** 31 - 1, though I don't know if that would have any In the video he mentions Pascal's version only being 32 bit and his is 64.