Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Real Users never know what they want, but they always know when your program doesn't deliver it.


devel / comp.lang.ada / Not good for Ada endorsement

SubjectAuthor
* Not good for Ada endorsementRichard Iswara
+* Re: Not good for Ada endorsementLuke A. Guest
|`* Re: Not good for Ada endorsementDoctor Who
| `* Re: Not good for Ada endorsementSimon Wright
|  `* Re: Not good for Ada endorsementDoctor Who
|   +- Re: Not good for Ada endorsementLuke A. Guest
|   `* Re: Not good for Ada endorsementRichard Iswara
|    `* Re: Not good for Ada endorsementJeffrey R. Carter
|     +- Re: Not good for Ada endorsementDmitry A. Kazakov
|     +- Re: Not good for Ada endorsementLuke A. Guest
|     `* Re: Not good for Ada endorsementJeffrey R. Carter
|      `* Re: Not good for Ada endorsementLuke A. Guest
|       `* Re: Not good for Ada endorsementJeffrey R. Carter
|        `* Re: Not good for Ada endorsementLuke A. Guest
|         +* Re: Not good for Ada endorsementLuke A. Guest
|         |`- Re: Not good for Ada endorsementLuke A. Guest
|         +* Re: Not good for Ada endorsementLuke A. Guest
|         |`- Re: Not good for Ada endorsementRichard Iswara
|         +* Re: Not good for Ada endorsementPaul Rubin
|         |`- Re: Not good for Ada endorsementEgil H H
|         `* Re: Not good for Ada endorsementEgil H H
|          `* Re: Not good for Ada endorsementJeffrey R. Carter
|           `* Re: Not good for Ada endorsementJeffrey R. Carter
|            `* Re: Not good for Ada endorsementLucretia
|             `* Re: Not good for Ada endorsementJeffrey R. Carter
|              +* Re: Not good for Ada endorsementAnh Vo
|              |+* Re: Not good for Ada endorsementLucretia
|              ||+- Re: Not good for Ada endorsementSimon Wright
|              ||`* Re: Not good for Ada endorsementSimon Wright
|              || `- Re: Not good for Ada endorsementLuke A. Guest
|              |`* Re: Not good for Ada endorsementAnh Vo
|              | `- Re: Not good for Ada endorsementLuke A. Guest
|              `* Re: Not good for Ada endorsementLucretia
|               +- Re: Not good for Ada endorsementDmitry A. Kazakov
|               `- Re: Not good for Ada endorsementJeffrey R. Carter
+- Re: Not good for Ada endorsementDennis Lee Bieber
`* Re: Not good for Ada endorsementMace Ayres
 `- Re: Not good for Ada endorsementPaul Rubin

Pages:12
Not good for Ada endorsement

<cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5517&group=comp.lang.ada#5517

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ad4:5de4:: with SMTP id jn4mr24053448qvb.41.1625667716399;
Wed, 07 Jul 2021 07:21:56 -0700 (PDT)
X-Received: by 2002:a25:aa09:: with SMTP id s9mr33027517ybi.165.1625667716144;
Wed, 07 Jul 2021 07:21:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.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: Wed, 7 Jul 2021 07:21:55 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=139.228.32.66; posting-account=oy9pPgoAAACICsEVtbydIrxpi9tsYOGl
NNTP-Posting-Host: 139.228.32.66
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
Subject: Not good for Ada endorsement
From: haujekch...@gmail.com (Richard Iswara)
Injection-Date: Wed, 07 Jul 2021 14:21:56 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Richard Iswara - Wed, 7 Jul 2021 14:21 UTC

I haven't seen this posted before so apologies if redundant.
A couple days ago this person posted on YouTube this clip: https://www.youtube.com/watch?v=pv4Yq35Chx0.
In the video it was run against Pascal and Ada lost by being 50% slower than Pascal on Prime Sieving. Also shown as 2 orders of magnitude slower than the fastest implementation of that day. See on video at 20:45.
This is the base implementation link: https://github.com/PlummersSoftwareLLC/Primes/blob/drag-race/PrimeAda/solution_1/src/main.adb.
I know it's trivial, and probably click bait on the video person, but this is not a good PR on Ada reputation. The guy said do a better implementation to get a better score. So can Ada implementation do better?

Re: Not good for Ada endorsement

<sc4fuo$8vn$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5518&group=comp.lang.ada#5518

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Wed, 7 Jul 2021 16:06:46 +0100
Organization: Aioe.org NNTP Server
Lines: 16
Message-ID: <sc4fuo$8vn$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.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
 by: Luke A. Guest - Wed, 7 Jul 2021 15:06 UTC

On 07/07/2021 15:21, Richard Iswara wrote:
> I haven't seen this posted before so apologies if redundant.
> A couple days ago this person posted on YouTube this clip: https://www.youtube.com/watch?v=pv4Yq35Chx0.

I watched this finally yesterday as it kept popping up. I started
running the entire project last night as running the Ada one on it's own
didn't do anything. It's still running, It's been on PrimeR all day!

> In the video it was run against Pascal and Ada lost by being 50% slower than Pascal on Prime Sieving. Also shown as 2 orders of magnitude slower than the fastest implementation of that day. See on video at 20:45.
> This is the base implementation link: https://github.com/PlummersSoftwareLLC/Primes/blob/drag-race/PrimeAda/solution_1/src/main.adb.
> I know it's trivial, and probably click bait on the video person, but this is not a good PR on Ada reputation. The guy said do a better implementation to get a better score. So can Ada implementation do better?
>

Don't know as I don't know the algorithm, but I did clone the repo to
look at it. I would be comparing Ada with C, C++, Pascal and any other
compiled language. Not just Pascal.

Re: Not good for Ada endorsement

<e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5519&group=comp.lang.ada#5519

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: doc...@tardis.org (Doctor Who)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Wed, 07 Jul 2021 17:19:13 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com> <sc4fuo$8vn$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="f600ef001f55da9f0ff8415224ffa5c0";
logging-data="28660"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+B7riHR5hns46ERs2wleiA"
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:35MdXhifjuOkC3sFY8w3lCLiEew=
 by: Doctor Who - Wed, 7 Jul 2021 15:19 UTC

On Wed, 7 Jul 2021 16:06:46 +0100, "Luke A. Guest"
<laguest@archeia.com> wrote:

>On 07/07/2021 15:21, Richard Iswara wrote:
>> I haven't seen this posted before so apologies if redundant.
>> A couple days ago this person posted on YouTube this clip: https://www.youtube.com/watch?v=pv4Yq35Chx0.
>
>I watched this finally yesterday as it kept popping up. I started
>running the entire project last night as running the Ada one on it's own
>didn't do anything. It's still running, It's been on PrimeR all day!
>
>> In the video it was run against Pascal and Ada lost by being 50% slower than Pascal on Prime Sieving. Also shown as 2 orders of magnitude slower than the fastest implementation of that day. See on video at 20:45.
>> This is the base implementation link: https://github.com/PlummersSoftwareLLC/Primes/blob/drag-race/PrimeAda/solution_1/src/main.adb.
>> I know it's trivial, and probably click bait on the video person, but this is not a good PR on Ada reputation. The guy said do a better implementation to get a better score. So can Ada implementation do better?
>>
>
>Don't know as I don't know the algorithm, but I did clone the repo to
>look at it. I would be comparing Ada with C, C++, Pascal and any other
>compiled language. Not just Pascal.

There are many algorithms to find primes, some are optimized some not.
It makes no sense comparing languages with the same algorithm, I'm
sure every language can be made faster with a language-optimized
prime-finding algorithm.

Re: Not good for Ada endorsement

<ly8s2iorpl.fsf@pushface.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5520&group=comp.lang.ada#5520

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Wed, 07 Jul 2021 20:21:26 +0100
Organization: Aioe.org NNTP Server
Lines: 7
Message-ID: <ly8s2iorpl.fsf@pushface.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org>
<e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
NNTP-Posting-Host: yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:kNcvkxIwRH177GmDMLVXP4m+CVA=
 by: Simon Wright - Wed, 7 Jul 2021 19:21 UTC

Doctor Who <doc@tardis.org> writes:

> It makes no sense comparing languages with the same algorithm,

I think it makes little sense to compare languages with _different_
algorithms.

Re: Not good for Ada endorsement

<5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5522&group=comp.lang.ada#5522

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: doc...@tardis.org (Doctor Who)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Wed, 07 Jul 2021 21:49:46 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com> <sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com> <ly8s2iorpl.fsf@pushface.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="f600ef001f55da9f0ff8415224ffa5c0";
logging-data="23391"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FJqhSRggOL4sK7DBq5VSG"
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:QhjjhtYi4qwityABClOb73LKW8o=
 by: Doctor Who - Wed, 7 Jul 2021 19:49 UTC

On Wed, 07 Jul 2021 20:21:26 +0100, Simon Wright <simon@pushface.org>
wrote:

>Doctor Who <doc@tardis.org> writes:
>
>> It makes no sense comparing languages with the same algorithm,
>
>I think it makes little sense to compare languages with _different_
>algorithms.

it depends if you are comparing algorithms or comparing languages ...

Re: Not good for Ada endorsement

<sc53f0$1nas$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5523&group=comp.lang.ada#5523

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Wed, 7 Jul 2021 21:39:43 +0100
Organization: Aioe.org NNTP Server
Lines: 10
Message-ID: <sc53f0$1nas$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <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
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Luke A. Guest - Wed, 7 Jul 2021 20:39 UTC

On 07/07/2021 20:49, Doctor Who wrote:
>> I think it makes little sense to compare languages with _different_
>> algorithms.
>
> it depends if you are comparing algorithms or comparing languages ...
>

It's a comparison of languages using the same algorithm, but you can
also add in other algorithms, just like there are parallel versions.

Re: Not good for Ada endorsement

<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5530&group=comp.lang.ada#5530

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:584f:: with SMTP id h15mr26213135qth.362.1625715990496;
Wed, 07 Jul 2021 20:46:30 -0700 (PDT)
X-Received: by 2002:a25:690e:: with SMTP id e14mr36259137ybc.277.1625715990227;
Wed, 07 Jul 2021 20:46:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 7 Jul 2021 20:46:29 -0700 (PDT)
In-Reply-To: <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=36.85.88.151; posting-account=oy9pPgoAAACICsEVtbydIrxpi9tsYOGl
NNTP-Posting-Host: 36.85.88.151
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
Subject: Re: Not good for Ada endorsement
From: haujekch...@gmail.com (Richard Iswara)
Injection-Date: Thu, 08 Jul 2021 03:46:30 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2097
 by: Richard Iswara - Thu, 8 Jul 2021 03:46 UTC

On Thursday, July 8, 2021 at 2:49:48 AM UTC+7, Doctor Who wrote:
> On Wed, 07 Jul 2021 20:21:26 +0100, Simon Wright <si...@pushface.org>
> wrote:
> >Doctor Who <d...@tardis.org> writes:
> >
> >> It makes no sense comparing languages with the same algorithm,
> >
> >I think it makes little sense to compare languages with _different_
> >algorithms.
> it depends if you are comparing algorithms or comparing languages ...
It is supposed to be a basic Sieve of Erastosthenes searching primes under 1 million.
Odd number search only, can be multi threaded and skip ahead. See the rules at: https://github.com/plummerssoftwarellc/Primes/blob/drag-race/CONTRIBUTING.md#rules.
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.

Re: Not good for Ada endorsement

<sc6cgh$9vu$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5531&group=comp.lang.ada#5531

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 10:20:31 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 21
Message-ID: <sc6cgh$9vu$1@dont-email.me>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Jul 2021 08:20:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0384baa1f4ca43093e9cff3bed7731f1";
logging-data="10238"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qf/xzxAACrL7Nt53dZ9lr1o1YLD0OO6M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:3RHZWey4yXVUzChagrd9E9Vx+mU=
In-Reply-To: <a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R. Carter - Thu, 8 Jul 2021 08:20 UTC

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.

Compiling with -gnatp -O3 would undoubtedly speed it up (suppressing checks is
justified since execution with checks active shows that no checks fail).

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 effect. The first inner loop in the sieve algorithm could be
eliminated, in which case the initialization of Num could also be removed.

--
Jeff Carter
"My legs are gray, my ears are gnarled, my eyes are old and bent."
Monty Python's Life of Brian
81

Re: Not good for Ada endorsement

<sc6dpv$7qo$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5532&group=comp.lang.ada#5532

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 10:42:40 +0200
Organization: Aioe.org NNTP Server
Lines: 35
Message-ID: <sc6dpv$7qo$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me>
NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.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 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Thu, 8 Jul 2021 08:42 UTC

On 2021-07-08 10: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.
>
> Compiling with -gnatp -O3 would undoubtedly speed it up (suppressing
> checks is justified since execution with checks active shows that no
> checks fail).
>
> 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
> effect. The first inner loop in the sieve algorithm could be eliminated,
> in which case the initialization of Num could also be removed.

Exactly, this is what is wrong with such contests. The solution is
non-scalable giving advantage to low-level languages like C. Scalability
and readability has the price that hobby-sized instances work poorly.

P.S. I would also suggest ensuring the Boolean array not packed. If not
with compiler switches and pragmas then by declaring a custom Boolean
1,2,4,8 bytes long depending on the target architecture. It is not a
fair play, guys!

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Not good for Ada endorsement

<sc6ecm$g7a$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5533&group=comp.lang.ada#5533

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (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
Lines: 24
Message-ID: <sc6ecm$g7a$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me>
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
 by: Luke A. Guest - Thu, 8 Jul 2021 08:52 UTC

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.

Re: Not good for Ada endorsement

<sc6kqh$1sj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5534&group=comp.lang.ada#5534

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 12:42:25 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 36
Message-ID: <sc6kqh$1sj$1@dont-email.me>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Jul 2021 10:42:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="cb2457d9224309e070dc9e984a070cbf";
logging-data="1939"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JO+GlGljPhiBPi9uY+CLeoHx19bem1O0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:KGUtiTX1EvZtDE1FNAngs3p0hm4=
In-Reply-To: <sc6cgh$9vu$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R. Carter - Thu, 8 Jul 2021 10:42 UTC

On 7/8/21 10:20 AM, Jeffrey R. Carter wrote:
>
> Compiling with -gnatp -O3 would undoubtedly speed it up (suppressing checks is
> justified since execution with checks active shows that no checks fail).
>
> 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 effect. The first inner loop in the sieve algorithm could be
> eliminated, in which case the initialization of Num could also be removed.

Compiling the original code with

gnatmake prime_sieve.adb

gives 408 passes in 5 seconds.

Making the changes listed above (I used Interfaces.Integer_32) and compiling with

gnatmake -O3 prime_sieve.adb

(to ensure that no checks fail) gives 2087 passes in 5 seconds, for a factor of 5.1.

Applying that to the reported 67 passes/second for the original on the test
system implies that this version, compiled with checks enabled and optimization,
would give 343 passes/second.

--
Jeff Carter
"My legs are gray, my ears are gnarled, my eyes are old and bent."
Monty Python's Life of Brian
81

Re: Not good for Ada endorsement

<sc6lba$1vma$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5535&group=comp.lang.ada#5535

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 11:51:03 +0100
Organization: Aioe.org NNTP Server
Lines: 27
Message-ID: <sc6lba$1vma$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
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
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Luke A. Guest - Thu, 8 Jul 2021 10:51 UTC

On 08/07/2021 11:42, Jeffrey R. Carter wrote:

Here's the playlist
https://youtube.com/playlist?list=PLF2KJ6Gy3cZ5Er-1eF9fN1Hgw_xkoD9V1 the
second video is where he sets up Python, C# and C++.

> Compiling the original code with
>
> gnatmake prime_sieve.adb
>
> gives 408 passes in 5 seconds.
>
> Making the changes listed above (I used Interfaces.Integer_32) and
> compiling with
>
> gnatmake -O3 prime_sieve.adb
>
> (to ensure that no checks fail) gives 2087 passes in 5 seconds, for a
> factor of 5.1.

He shows the C++ jumping from 4645 (https://youtu.be/D3h62rgewZM?t=1246)
to 7,436 (https://youtu.be/D3h62rgewZM?t=1306) passes going from 32 to
64 bit.

He also uses clang's -Ofast option to compile for speed over size.

Re: Not good for Ada endorsement

<sc6mit$ddv$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5536&group=comp.lang.ada#5536

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 13:12:29 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 33
Message-ID: <sc6mit$ddv$1@dont-email.me>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Jul 2021 11:12:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="cb2457d9224309e070dc9e984a070cbf";
logging-data="13759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18J0kiWbKa3LX87hZC94lz/hoetxzBFXU4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:6hxNvdCapd0GhAIzidxbU1x1jys=
In-Reply-To: <sc6lba$1vma$1@gioia.aioe.org>
Content-Language: en-US
 by: Jeffrey R. Carter - Thu, 8 Jul 2021 11:12 UTC

On 7/8/21 12:51 PM, Luke A. Guest wrote:
>
> On 08/07/2021 11:42, Jeffrey R. Carter wrote:
>
> Here's the playlist
> https://youtube.com/playlist?list=PLF2KJ6Gy3cZ5Er-1eF9fN1Hgw_xkoD9V1 the second
> video is where he sets up Python, C# and C++.
>
>> Compiling the original code with
>>
>> gnatmake prime_sieve.adb
>>
>> gives 408 passes in 5 seconds.
>>
>> Making the changes listed above (I used Interfaces.Integer_32) and compiling with
>>
>> gnatmake -O3 prime_sieve.adb
>>
>> (to ensure that no checks fail) gives 2087 passes in 5 seconds, for a factor
>> of 5.1.
>
> He shows the C++ jumping from 4645 (https://youtu.be/D3h62rgewZM?t=1246) to
> 7,436 (https://youtu.be/D3h62rgewZM?t=1306) passes going from 32 to 64 bit.
>
> He also uses clang's -Ofast option to compile for speed over size.

Going back to 64-bit integers gives 1999; with -gnatp, 2098

--
Jeff Carter
"My legs are gray, my ears are gnarled, my eyes are old and bent."
Monty Python's Life of Brian
81

Re: Not good for Ada endorsement

<sc7d65$1kcq$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5538&group=comp.lang.ada#5538

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 18:37:54 +0100
Organization: Aioe.org NNTP Server
Lines: 12
Message-ID: <sc7d65$1kcq$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
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
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Luke A. Guest - Thu, 8 Jul 2021 17:37 UTC

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.

Re: Not good for Ada endorsement

<sc7dh1$1ojq$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5539&group=comp.lang.ada#5539

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (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
Lines: 27
Message-ID: <sc7dh1$1ojq$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
<sc7d65$1kcq$1@gioia.aioe.org>
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
 by: Luke A. Guest - Thu, 8 Jul 2021 17:43 UTC

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

Re: Not good for Ada endorsement

<sc7iue$bcq$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5540&group=comp.lang.ada#5540

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 20:16:11 +0100
Organization: Aioe.org NNTP Server
Lines: 19
Message-ID: <sc7iue$bcq$1@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
<sc7d65$1kcq$1@gioia.aioe.org> <sc7dh1$1ojq$1@gioia.aioe.org>
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: 8bit
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
 by: Luke A. Guest - Thu, 8 Jul 2021 19:16 UTC

On 08/07/2021 18:43, Luke A. Guest wrote:
> 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

I've updated again, moving the main function to the generic, strange
results.

This also now used packed and unpacked boolean arrays.

I'd be interested to see what numbers your machines get, mine's a tad
ancient now.

Re: Not good for Ada endorsement

<sc7iv2$bcq$2@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5541&group=comp.lang.ada#5541

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org.POSTED!not-for-mail
From: lagu...@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Thu, 8 Jul 2021 20:16:31 +0100
Organization: Aioe.org NNTP Server
Lines: 15
Message-ID: <sc7iv2$bcq$2@gioia.aioe.org>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
<sc7d65$1kcq$1@gioia.aioe.org>
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
 by: Luke A. Guest - Thu, 8 Jul 2021 19:16 UTC

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.

Re: Not good for Ada endorsement

<a3bfbd25-9cae-4e0e-891a-2e3f88001b4an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5542&group=comp.lang.ada#5542

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:3d4:: with SMTP id 203mr4894591qkd.499.1625798878801;
Thu, 08 Jul 2021 19:47:58 -0700 (PDT)
X-Received: by 2002:a25:d4f:: with SMTP id 76mr45867654ybn.173.1625798878623;
Thu, 08 Jul 2021 19:47:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.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, 8 Jul 2021 19:47:58 -0700 (PDT)
In-Reply-To: <sc7iv2$bcq$2@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=36.85.88.151; posting-account=oy9pPgoAAACICsEVtbydIrxpi9tsYOGl
NNTP-Posting-Host: 36.85.88.151
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com> <sc6cgh$9vu$1@dont-email.me>
<sc6kqh$1sj$1@dont-email.me> <sc6lba$1vma$1@gioia.aioe.org>
<sc6mit$ddv$1@dont-email.me> <sc7d65$1kcq$1@gioia.aioe.org> <sc7iv2$bcq$2@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a3bfbd25-9cae-4e0e-891a-2e3f88001b4an@googlegroups.com>
Subject: Re: Not good for Ada endorsement
From: haujekch...@gmail.com (Richard Iswara)
Injection-Date: Fri, 09 Jul 2021 02:47:58 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Richard Iswara - Fri, 9 Jul 2021 02:47 UTC

On Friday, July 9, 2021 at 2:16:54 AM UTC+7, Luke A. Guest wrote:
> 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.
Thank you. Well done.

Re: Not good for Ada endorsement

<87mtqvucud.fsf@nightsong.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5543&group=comp.lang.ada#5543

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Fri, 09 Jul 2021 01:10:34 -0700
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <87mtqvucud.fsf@nightsong.com>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org>
<e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org>
<5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
<sc7d65$1kcq$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="f71bfd2924a96713e31cdce7f664c7c7";
logging-data="10553"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ec1ZVHHkbF1dal34aMv3J"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Cancel-Lock: sha1:IhvW4giQiKvrvUYrqwqC6YH9j30=
sha1:aLxQeElF3VKcyJgfkfYXQ5lHqQQ=
 by: Paul Rubin - Fri, 9 Jul 2021 08:10 UTC

"Luke A. Guest" <laguest@archeia.com> writes:
> It's as straight a conversion from the C++ to Ada. I intend to keep
> optimising it.

I'd be interested in seeing a straight conversion of Pascal to Ada, if
the existing Ada code differs significantly from the existing Pascal
code in a way that affects the speed and isn't a straightforward
conversion.

Re: Not good for Ada endorsement

<e350c5dc-90f2-4354-b33a-90edad858169n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5544&group=comp.lang.ada#5544

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:46d0:: with SMTP id h16mr5127405qto.362.1625819041546;
Fri, 09 Jul 2021 01:24:01 -0700 (PDT)
X-Received: by 2002:a25:dc50:: with SMTP id y77mr45499316ybe.405.1625819041322;
Fri, 09 Jul 2021 01:24:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.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, 9 Jul 2021 01:24:01 -0700 (PDT)
In-Reply-To: <87mtqvucud.fsf@nightsong.com>
Injection-Info: google-groups.googlegroups.com; posting-host=89.8.153.148; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn
NNTP-Posting-Host: 89.8.153.148
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com> <sc6cgh$9vu$1@dont-email.me>
<sc6kqh$1sj$1@dont-email.me> <sc6lba$1vma$1@gioia.aioe.org>
<sc6mit$ddv$1@dont-email.me> <sc7d65$1kcq$1@gioia.aioe.org> <87mtqvucud.fsf@nightsong.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e350c5dc-90f2-4354-b33a-90edad858169n@googlegroups.com>
Subject: Re: Not good for Ada endorsement
From: ehh.pub...@gmail.com (Egil H H)
Injection-Date: Fri, 09 Jul 2021 08:24:01 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Egil H H - Fri, 9 Jul 2021 08:24 UTC

On Friday, July 9, 2021 at 10:10:37 AM UTC+2, Paul Rubin wrote:
> "Luke A. Guest" <> writes:
> > It's as straight a conversion from the C++ to Ada. I intend to keep
> > optimising it.
> I'd be interested in seeing a straight conversion of Pascal to Ada, if
> the existing Ada code differs significantly from the existing Pascal
> code in a way that affects the speed and isn't a straightforward
> conversion.

One significant difference between the original Ada version and the Pascal and C++ versions, is
that Ada is missing a Num := Factor before the first inner loop.
(Luke fixed that in his version, though)

Re: Not good for Ada endorsement

<d4b4342e-b2ef-4ed3-a586-85b4c5c8bd9dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5545&group=comp.lang.ada#5545

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:34c:: with SMTP id r12mr32589581qtw.196.1625819639453;
Fri, 09 Jul 2021 01:33:59 -0700 (PDT)
X-Received: by 2002:a25:6b0c:: with SMTP id g12mr40801144ybc.303.1625819639232;
Fri, 09 Jul 2021 01:33:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.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, 9 Jul 2021 01:33:59 -0700 (PDT)
In-Reply-To: <sc7d65$1kcq$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=89.8.153.148; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn
NNTP-Posting-Host: 89.8.153.148
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com> <sc6cgh$9vu$1@dont-email.me>
<sc6kqh$1sj$1@dont-email.me> <sc6lba$1vma$1@gioia.aioe.org>
<sc6mit$ddv$1@dont-email.me> <sc7d65$1kcq$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4b4342e-b2ef-4ed3-a586-85b4c5c8bd9dn@googlegroups.com>
Subject: Re: Not good for Ada endorsement
From: ehh.pub...@gmail.com (Egil H H)
Injection-Date: Fri, 09 Jul 2021 08:33:59 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Egil H H - Fri, 9 Jul 2021 08:33 UTC

On Thursday, July 8, 2021 at 7:38:19 PM UTC+2, 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.

On my computer, at least, GNAT is not happy about incrementing Number by 2
in the inner loop. I get a bit better performance by modifying the check to

if Number mod 2 /= 0 and then Sieve.Bits(Index_Type(Number)) then

and then incrementing Number by 1.

Or even rewriting to a for-loop

Is_Prime : for Foo in Index_Type (Factor)..Sieve.Size loop
if Foo mod 2 /= 0 and then Sieve.Bits (Foo) then
Factor := Integer(Foo);
exit Is_Prime;
end if;
end loop Is_Prime;

Re: Not good for Ada endorsement

<sc9458$2rq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5546&group=comp.lang.ada#5546

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Fri, 9 Jul 2021 11:16:24 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 19
Message-ID: <sc9458$2rq$1@dont-email.me>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
<sc7d65$1kcq$1@gioia.aioe.org>
<d4b4342e-b2ef-4ed3-a586-85b4c5c8bd9dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Jul 2021 09:16:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7dfc9170bc246080afb1a33abe93bee2";
logging-data="2938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pkK0aWgi76zhfbOxJKRP0rwxL2c5hW28="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:sFu+ru1Td7IFsecjYAQPc6IMaBE=
In-Reply-To: <d4b4342e-b2ef-4ed3-a586-85b4c5c8bd9dn@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R. Carter - Fri, 9 Jul 2021 09:16 UTC

On 7/9/21 10:33 AM, Egil H H wrote:
>
> On my computer, at least, GNAT is not happy about incrementing Number by 2
> in the inner loop. I get a bit better performance by modifying the check to
>
> if Number mod 2 /= 0 and then Sieve.Bits(Index_Type(Number)) then
>
> and then incrementing Number by 1.

Since both operands are positive, mod and rem give the same results, and rem is
usually a bit faster. It's normally not an issue, but in this case it's done
billions of times, so it might make a difference.

--
Jeff Carter
"Oh Lord, bless this thy hand grenade, that with it thou
mayst blow thine enemies to tiny bits, in thy mercy."
Monty Python and the Holy Grail
24

Re: Not good for Ada endorsement

<sc94dv$2rq$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5547&group=comp.lang.ada#5547

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Fri, 9 Jul 2021 11:21:02 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 24
Message-ID: <sc94dv$2rq$2@dont-email.me>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com>
<sc6cgh$9vu$1@dont-email.me> <sc6kqh$1sj$1@dont-email.me>
<sc6lba$1vma$1@gioia.aioe.org> <sc6mit$ddv$1@dont-email.me>
<sc7d65$1kcq$1@gioia.aioe.org>
<d4b4342e-b2ef-4ed3-a586-85b4c5c8bd9dn@googlegroups.com>
<sc9458$2rq$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Jul 2021 09:21:03 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7dfc9170bc246080afb1a33abe93bee2";
logging-data="2938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/W4CN/GhyB8JbWrryYMzW+U6DIMS0xnSc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:6oM+xjxAn6assJmYpFzLWfU4hLc=
In-Reply-To: <sc9458$2rq$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R. Carter - Fri, 9 Jul 2021 09:21 UTC

On 7/9/21 11:16 AM, Jeffrey R. Carter wrote:
> On 7/9/21 10:33 AM, Egil H H wrote:
>>
>> On my computer, at least, GNAT is not happy about incrementing Number by 2
>> in the inner loop. I get a bit better performance by modifying the check to
>>
>>        if Number mod 2 /= 0 and then Sieve.Bits(Index_Type(Number)) then
>>
>> and then incrementing Number by 1.
>
> Since both operands are positive, mod and rem give the same results, and rem is
> usually a bit faster. It's normally not an issue, but in this case it's done
> billions of times, so it might make a difference.

Note also that short-circuit forms (and then) require disabling processor-level
optimizations and may have a negative effect on execution time when used
unnecessarily.

--
Jeff Carter
"Oh Lord, bless this thy hand grenade, that with it thou
mayst blow thine enemies to tiny bits, in thy mercy."
Monty Python and the Holy Grail
24

Re: Not good for Ada endorsement

<8r4meg1glb6rbnh7aksovavgmcki8q61bf@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5552&group=comp.lang.ada#5552

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 11 Jul 2021 10:54:27 -0500
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.ada
Subject: Re: Not good for Ada endorsement
Date: Sun, 11 Jul 2021 11:54:27 -0400
Organization: IISS Elusive Unicorn
Message-ID: <8r4meg1glb6rbnh7aksovavgmcki8q61bf@4ax.com>
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
User-Agent: ForteAgent/8.00.32.1272
X-No-Archive: YES
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 21
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-8PSFu6qHBSQLIJrrL8SnVJfAqCPA/pbg6uRcMkChIUAtUO6uqWvimyee8vcqwNC1b2WzdqrJMeMAUYJ!et6c+ofE1xgHT/Rplq4BarDCp7/V0uXaEevAjrYHMRwudTIcX+Efv3LYgGroEu1BvUqm/10c
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2464
 by: Dennis Lee Bieber - Sun, 11 Jul 2021 15:54 UTC

On Wed, 7 Jul 2021 07:21:55 -0700 (PDT), Richard Iswara
<haujekchifan@gmail.com> declaimed the following:

>I haven't seen this posted before so apologies if redundant.
>A couple days ago this person posted on YouTube this clip: https://www.youtube.com/watch?v=pv4Yq35Chx0.
>In the video it was run against Pascal and Ada lost by being 50% slower than Pascal on Prime Sieving. Also shown as 2 orders of magnitude slower than the fastest implementation of that day. See on video at 20:45.
>This is the base implementation link: https://github.com/PlummersSoftwareLLC/Primes/blob/drag-race/PrimeAda/solution_1/src/main.adb.
>I know it's trivial, and probably click bait on the video person, but this is not a good PR on Ada reputation. The guy said do a better implementation to get a better score. So can Ada implementation do better?

It also showed up on the Free-Pascal group. Though their the concern
was relative to a C/C++ implementation.

The kicker... Said C/C++ implementation declared practically everything
as "constexpr" (or some such), and a Google search indicated that such
items are computed BY THE COMPILER! Not at executable run-time.
Run-time basically was "yup, we found them all".

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: Not good for Ada endorsement

<0e6ee3e9-baad-47b3-872b-90ec6c735920n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5570&group=comp.lang.ada#5570

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:41d2:: with SMTP id o18mr4182000qtm.10.1626361986301;
Thu, 15 Jul 2021 08:13:06 -0700 (PDT)
X-Received: by 2002:a25:6b0c:: with SMTP id g12mr6257538ybc.303.1626361986099;
Thu, 15 Jul 2021 08:13:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.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 08:13:05 -0700 (PDT)
In-Reply-To: <sc94dv$2rq$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=86.28.147.129; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS
NNTP-Posting-Host: 86.28.147.129
References: <cd296b88-2e0a-403f-82c7-973e41fa7331n@googlegroups.com>
<sc4fuo$8vn$1@gioia.aioe.org> <e9hbeg9014he87s6kbrkinrt4tre1cfgqc@4ax.com>
<ly8s2iorpl.fsf@pushface.org> <5a1cegtfm5ibqej3ldebpc4g99ujniqt9u@4ax.com>
<a0080e82-2f52-4fd7-9c44-6bc2d8f0664bn@googlegroups.com> <sc6cgh$9vu$1@dont-email.me>
<sc6kqh$1sj$1@dont-email.me> <sc6lba$1vma$1@gioia.aioe.org>
<sc6mit$ddv$1@dont-email.me> <sc7d65$1kcq$1@gioia.aioe.org>
<d4b4342e-b2ef-4ed3-a586-85b4c5c8bd9dn@googlegroups.com> <sc9458$2rq$1@dont-email.me>
<sc94dv$2rq$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0e6ee3e9-baad-47b3-872b-90ec6c735920n@googlegroups.com>
Subject: Re: Not good for Ada endorsement
From: laguest9...@googlemail.com (Lucretia)
Injection-Date: Thu, 15 Jul 2021 15:13:06 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Lucretia - Thu, 15 Jul 2021 15:13 UTC

On Friday, 9 July 2021 at 10:21:05 UTC+1, Jeffrey R. Carter wrote:
> On 7/9/21 11:16 AM, Jeffrey R. Carter wrote:
> >> if Number mod 2 /= 0 and then Sieve.Bits(Index_Type(Number)) then
> >>
> >> and then incrementing Number by 1.
> >
> > Since both operands are positive, mod and rem give the same results, and rem is
> > usually a bit faster. It's normally not an issue, but in this case it's done
> > billions of times, so it might make a difference.
> Note also that short-circuit forms (and then) require disabling processor-level
> optimizations and may have a negative effect on execution time when used
> unnecessarily.

You don't need those as the algorithm always starts at 3 and increments by 2.

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.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor