Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Vitamin C deficiency is apauling.


devel / comp.lang.c++ / Re: Sieve of Eratosthenes

SubjectAuthor
* Sieve of EratosthenesBonita Montero
+* Re: Sieve of Eratostheneswij
|+* Re: Sieve of EratosthenesBonita Montero
||`- Re: Sieve of Eratostheneswij
|`* Re: Sieve of EratosthenesPaavo Helde
| `- Re: Sieve of Eratostheneswij
+* Re: Sieve of EratosthenesAlf P. Steinbach
|+- Re: Sieve of EratosthenesAlf P. Steinbach
|+* Re: Sieve of EratosthenesAlf P. Steinbach
||`* Re: Sieve of EratosthenesAlf P. Steinbach
|| `- Re: Sieve of EratosthenesChris M. Thomasson
|+* Re: Sieve of Eratosthenesred floyd
||+* Re: Sieve of EratosthenesTim Rentsch
|||`* Re: Sieve of EratosthenesÖö Tiib
||| +* Re: Sieve of EratosthenesBen Bacarisse
||| |+* Re: Sieve of EratosthenesÖö Tiib
||| ||`* Re: Sieve of EratosthenesAlf P. Steinbach
||| || +* Re: Sieve of EratosthenesÖö Tiib
||| || |`* Re: Sieve of EratosthenesBonita Montero
||| || | `* Re: Sieve of EratosthenesBonita Montero
||| || |  `* Re: Sieve of EratosthenesMuttley
||| || |   `* Re: Sieve of EratosthenesBonita Montero
||| || |    `* Re: Sieve of EratosthenesMuttley
||| || |     +* Re: Sieve of EratosthenesBonita Montero
||| || |     |`* Re: Sieve of EratosthenesMuttley
||| || |     | `- Re: Sieve of EratosthenesBonita Montero
||| || |     +* Re: Sieve of EratosthenesBonita Montero
||| || |     |+* Re: Sieve of EratosthenesMuttley
||| || |     ||`* Re: Sieve of EratosthenesBonita Montero
||| || |     || `* Re: Sieve of EratosthenesMuttley
||| || |     ||  `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||   `* Re: Sieve of EratosthenesMuttley
||| || |     ||    `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||     `* Re: Sieve of EratosthenesMuttley
||| || |     ||      `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||       `* Re: Sieve of EratosthenesMuttley
||| || |     ||        `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||         `* Re: Sieve of EratosthenesMuttley
||| || |     ||          `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||           `* Re: Sieve of EratosthenesMuttley
||| || |     ||            `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||             `* Re: Sieve of EratosthenesMuttley
||| || |     ||              `* Re: Sieve of EratosthenesBonita Montero
||| || |     ||               `* Re: Sieve of EratosthenesMuttley
||| || |     ||                `- Re: Sieve of EratosthenesBonita Montero
||| || |     |`* Re: Sieve of EratosthenesBen Bacarisse
||| || |     | `- Re: Sieve of EratosthenesBonita Montero
||| || |     `* Re: Sieve of EratosthenesScott Lurndal
||| || |      +* Re: Sieve of EratosthenesBonita Montero
||| || |      |`- Re: Sieve of EratosthenesScott Lurndal
||| || |      `* Re: Sieve of EratosthenesMuttley
||| || |       `* Re: Sieve of EratosthenesBonita Montero
||| || |        `- Re: Sieve of EratosthenesScott Lurndal
||| || `- Re: Sieve of EratosthenesBen Bacarisse
||| |`* Re: Sieve of EratosthenesTim Rentsch
||| | `* Re: Sieve of EratosthenesBen Bacarisse
||| |  `* Re: Sieve of EratosthenesTim Rentsch
||| |   `- Re: Sieve of EratosthenesBen Bacarisse
||| `- Re: Sieve of EratosthenesTim Rentsch
||`* Re: Sieve of EratosthenesBonita Montero
|| `* Re: Sieve of EratosthenesBonita Montero
||  `* Re: Sieve of EratosthenesAlf P. Steinbach
||   +- Re: Sieve of EratosthenesBonita Montero
||   +- Re: Sieve of EratosthenesBonita Montero
||   `* Re: Sieve of EratosthenesBonita Montero
||    `* Re: Sieve of EratosthenesMuttley
||     `* Re: Sieve of EratosthenesBonita Montero
||      `* Re: Sieve of EratosthenesMuttley
||       `* Re: Sieve of EratosthenesBonita Montero
||        `* Re: Sieve of EratosthenesMuttley
||         `* Re: Sieve of EratosthenesBonita Montero
||          +* Re: Sieve of EratosthenesÖö Tiib
||          |`* Re: Sieve of EratosthenesBonita Montero
||          | +- Re: Sieve of EratosthenesBonita Montero
||          | `* Re: Sieve of EratosthenesÖö Tiib
||          |  `- Re: Sieve of EratosthenesBonita Montero
||          `* Re: Sieve of EratosthenesMuttley
||           `* Re: Sieve of EratosthenesBonita Montero
||            +- Re: Sieve of EratosthenesBonita Montero
||            `* Re: Sieve of EratosthenesMuttley
||             `* Re: Sieve of EratosthenesBonita Montero
||              `* Re: Sieve of EratosthenesMuttley
||               `* Re: Sieve of EratosthenesBonita Montero
||                `* Re: Sieve of EratosthenesMuttley
||                 +* Re: Sieve of EratosthenesBonita Montero
||                 |`* Re: Sieve of EratosthenesMuttley
||                 | `* Re: Sieve of EratosthenesBonita Montero
||                 |  `* Re: Sieve of EratosthenesMuttley
||                 |   `* Re: Sieve of EratosthenesBonita Montero
||                 |    `* Re: Sieve of EratosthenesMuttley
||                 |     `* Re: Sieve of EratosthenesBonita Montero
||                 |      +* Re: Sieve of EratosthenesRichard Damon
||                 |      |`* Re: Sieve of EratosthenesBonita Montero
||                 |      | `* Re: Sieve of EratosthenesMuttley
||                 |      |  `* Re: Sieve of EratosthenesBonita Montero
||                 |      |   `* Re: Sieve of EratosthenesMuttley
||                 |      |    `* Re: Sieve of EratosthenesBonita Montero
||                 |      |     `* Re: Sieve of EratosthenesMuttley
||                 |      |      `* Re: Sieve of EratosthenesBonita Montero
||                 |      |       `* Re: Sieve of EratosthenesMuttley
||                 |      |        +* Re: Sieve of EratosthenesBonita Montero
||                 |      |        `* Re: Sieve of EratosthenesDaniel
||                 |      `* Re: Sieve of EratosthenesMuttley
||                 `* Re: Sieve of EratosthenesScott Lurndal
|`* Re: Sieve of Eratostheneswij
+- Re: Sieve of EratosthenesBonita Montero
+- Re: Sieve of EratosthenesBonita Montero
`* Re: Sieve of EratosthenesBonita Montero

Pages:123456
Re: Sieve of Eratosthenes

<uc09e1$20jj6$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1082&group=comp.lang.c%2B%2B#1082

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Mon, 21 Aug 2023 18:12:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <uc09e1$20jj6$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me>
Injection-Date: Mon, 21 Aug 2023 18:12:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fda3c9894a8af2ff94db8756b8e459c1";
logging-data="2117222"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199cVeV89GnviuuCFWC/rqE"
Cancel-Lock: sha1:i8Sw7C90jG00XtBHD/eHXqBgvxs=
 by: Mutt...@dastardlyhq.com - Mon, 21 Aug 2023 18:12 UTC

On Mon, 21 Aug 2023 19:50:32 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 21.08.2023 um 19:19 schrieb Muttley@dastardlyhq.com:
>> On Mon, 21 Aug 2023 11:00:15 +0200
>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> I tried to combine the bitmap-approach with the heap-approach,
>>> having a bitmap that fits into the cache and which is a window
>>> inside the rows of numbers.
>>
>> If only erastothenes had had C++20 he too could have come up with some
>> hopeless complicated solution no one understood. Or maybe he would have
>> done some simple baby code in C...
>
>On my PC printing the all primes below 1E8 takes 0.827s with your
>code. With my code it takes about 0.36s.

I'm fairly sure I could speed it up if I could be bothered.

>Take this as a reference:

Sorry, can't be bothered to wade through that mess.

Re: Sieve of Eratosthenes

<uc0a19$20m3n$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1083&group=comp.lang.c%2B%2B#1083

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Mon, 21 Aug 2023 20:22:36 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <uc0a19$20m3n$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 21 Aug 2023 18:22:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bebcf752d5dd72ba4411673c0932c9fd";
logging-data="2119799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ghyW2xdDhVPqxyOHS93TDZB/LbemgD78="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CX3XYdTm4zL467KaBS1uK05TXOY=
Content-Language: de-DE
In-Reply-To: <uc09e1$20jj6$1@dont-email.me>
 by: Bonita Montero - Mon, 21 Aug 2023 18:22 UTC

Am 21.08.2023 um 20:12 schrieb Muttley@dastardlyhq.com:

> On Mon, 21 Aug 2023 19:50:32 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:

>> On my PC printing the all primes below 1E8 takes 0.827s with your
>> code. With my code it takes about 0.36s.

> I'm fairly sure I could speed it up if I could be bothered.

For sure not.

>> Take this as a reference:

> Sorry, can't be bothered to wade through that mess.

It's a mess because you're overburdened with reading the code.

Re: Sieve of Eratosthenes

<uc0ca1$213lo$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1084&group=comp.lang.c%2B%2B#1084

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Mon, 21 Aug 2023 19:01:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uc0ca1$213lo$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me>
Injection-Date: Mon, 21 Aug 2023 19:01:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fda3c9894a8af2ff94db8756b8e459c1";
logging-data="2133688"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wRYujO+b2GJ1S+j4MakM0"
Cancel-Lock: sha1:xEBRLPnjK4vYvaMUxW/NCJiub3Y=
 by: Mutt...@dastardlyhq.com - Mon, 21 Aug 2023 19:01 UTC

On Mon, 21 Aug 2023 20:22:36 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 21.08.2023 um 20:12 schrieb Muttley@dastardlyhq.com:
>
>> On Mon, 21 Aug 2023 19:50:32 +0200
>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>
>>> On my PC printing the all primes below 1E8 takes 0.827s with your
>>> code. With my code it takes about 0.36s.
>
>> I'm fairly sure I could speed it up if I could be bothered.
>
>For sure not.

And why's that then? Give us your insight.

>
>>> Take this as a reference:
>
>> Sorry, can't be bothered to wade through that mess.
>
>It's a mess because you're overburdened with reading the code.

A mess is burdensome.

Re: Sieve of Eratosthenes

<uc19v6$28t5s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1088&group=comp.lang.c%2B%2B#1088

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 05:27:36 +0200
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uc19v6$28t5s$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 03:27:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2389180"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Rv8wmKXMyxfhT2npjK8hz+XoFany4slA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:XSUacGSRapn6zKyqAkdDLDvnwVk=
In-Reply-To: <uc0ca1$213lo$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 22 Aug 2023 03:27 UTC

Am 21.08.2023 um 21:01 schrieb Muttley@dastardlyhq.com:
> On Mon, 21 Aug 2023 20:22:36 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 21.08.2023 um 20:12 schrieb Muttley@dastardlyhq.com:
>>
>>> On Mon, 21 Aug 2023 19:50:32 +0200
>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>
>>>> On my PC printing the all primes below 1E8 takes 0.827s with your
>>>> code. With my code it takes about 0.36s.
>>
>>> I'm fairly sure I could speed it up if I could be bothered.
>>
>> For sure not.
>
> And why's that then? ...

Because you can only write simple code.

>
>>
>>>> Take this as a reference:
>>
>>> Sorry, can't be bothered to wade through that mess.
>>
>> It's a mess because you're overburdened with reading the code.
>
> A mess is burdensome.
>
>

Re: Sieve of Eratosthenes

<64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1093&group=comp.lang.c%2B%2B#1093

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:3acc:b0:76d:7267:2581 with SMTP id ss12-20020a05620a3acc00b0076d72672581mr50777qkn.10.1692685555091;
Mon, 21 Aug 2023 23:25:55 -0700 (PDT)
X-Received: by 2002:a63:3c0f:0:b0:564:9d5e:c985 with SMTP id
j15-20020a633c0f000000b005649d5ec985mr1238410pga.1.1692685554445; Mon, 21 Aug
2023 23:25:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!fdn.fr!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.c++
Date: Mon, 21 Aug 2023 23:25:53 -0700 (PDT)
In-Reply-To: <uc19v6$28t5s$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me> <uc19v6$28t5s$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>
Subject: Re: Sieve of Eratosthenes
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Tue, 22 Aug 2023 06:25:55 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Öö Tiib - Tue, 22 Aug 2023 06:25 UTC

On Tuesday, 22 August 2023 at 06:27:51 UTC+3, Bonita Montero wrote:
> Am 21.08.2023 um 21:01 schrieb Mut...@dastardlyhq.com:
> > On Mon, 21 Aug 2023 20:22:36 +0200
> > Bonita Montero <Bonita....@gmail.com> wrote:
> >> Am 21.08.2023 um 20:12 schrieb Mut...@dastardlyhq.com:
> >>
> >>> On Mon, 21 Aug 2023 19:50:32 +0200
> >>> Bonita Montero <Bonita....@gmail.com> wrote:
> >>
> >>>> On my PC printing the all primes below 1E8 takes 0.827s with your
> >>>> code. With my code it takes about 0.36s.
> >>
> >>> I'm fairly sure I could speed it up if I could be bothered.
> >>
> >> For sure not.
> >
> > And why's that then? ...
>
> Because you can only write simple code.

Do not hijack nice thread of finding primes with your optimising
textual output.
Store primes however you want to and do not time text streaming
whatsoever. The problem was to find primes.

Re: Sieve of Eratosthenes

<uc1m68$2afn4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1094&group=comp.lang.c%2B%2B#1094

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 06:56:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uc1m68$2afn4$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me>
Injection-Date: Tue, 22 Aug 2023 06:56:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2440932"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1xdRWan1Yi2j1EvzJHMXg"
Cancel-Lock: sha1:MsG7n0rFdUbK0gCCUzKIwLCX4e0=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 06:56 UTC

On Tue, 22 Aug 2023 05:27:36 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 21.08.2023 um 21:01 schrieb Muttley@dastardlyhq.com:
>> On Mon, 21 Aug 2023 20:22:36 +0200
>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> Am 21.08.2023 um 20:12 schrieb Muttley@dastardlyhq.com:
>>>
>>>> On Mon, 21 Aug 2023 19:50:32 +0200
>>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>
>>>>> On my PC printing the all primes below 1E8 takes 0.827s with your
>>>>> code. With my code it takes about 0.36s.
>>>
>>>> I'm fairly sure I could speed it up if I could be bothered.
>>>
>>> For sure not.
>>
>> And why's that then? ...
>
>Because you can only write simple code.

Simpler code = more efficient, less bugs and easier to maintain all other
things being equal. Complexity in code isn't a goal, its something to be
kept to a minimum. If you were even half the genius coder you seem to think
you are you'd already be aware of this.

Re: Sieve of Eratosthenes

<uc1uqm$2brns$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1095&group=comp.lang.c%2B%2B#1095

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 11:23:36 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <uc1uqm$2brns$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me>
<64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 22 Aug 2023 09:23:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2486012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/415V0n2DUvWjHFjC/GUGOWKpcnFZ5/Ig="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:pNzv7VIhuOoRdwDclhhIJS25IIs=
In-Reply-To: <64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>
Content-Language: de-DE
 by: Bonita Montero - Tue, 22 Aug 2023 09:23 UTC

Am 22.08.2023 um 08:25 schrieb Öö Tiib:
> On Tuesday, 22 August 2023 at 06:27:51 UTC+3, Bonita Montero wrote:
>> Am 21.08.2023 um 21:01 schrieb Mut...@dastardlyhq.com:
>>> On Mon, 21 Aug 2023 20:22:36 +0200
>>> Bonita Montero <Bonita....@gmail.com> wrote:
>>>> Am 21.08.2023 um 20:12 schrieb Mut...@dastardlyhq.com:
>>>>
>>>>> On Mon, 21 Aug 2023 19:50:32 +0200
>>>>> Bonita Montero <Bonita....@gmail.com> wrote:
>>>>
>>>>>> On my PC printing the all primes below 1E8 takes 0.827s with your
>>>>>> code. With my code it takes about 0.36s.
>>>>
>>>>> I'm fairly sure I could speed it up if I could be bothered.
>>>>
>>>> For sure not.
>>>
>>> And why's that then? ...
>>
>> Because you can only write simple code.
>
> Do not hijack nice thread of finding primes with your optimising
> textual output.

The speedup over cout << p << endl is massive, at least with MSVC;
I've measured that, you didn't.

Re: Sieve of Eratosthenes

<uc1v1v$2brns$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1096&group=comp.lang.c%2B%2B#1096

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 11:27:29 +0200
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <uc1v1v$2brns$2@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 09:27:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2486012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MpbfM8gdEXOAgdMgoP8jHsMfvqIq50BY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3YAZqXwq5wWJqNtQWWBeCCUoMg4=
Content-Language: de-DE
In-Reply-To: <uc1m68$2afn4$1@dont-email.me>
 by: Bonita Montero - Tue, 22 Aug 2023 09:27 UTC

Am 22.08.2023 um 08:56 schrieb Muttley@dastardlyhq.com:
> On Tue, 22 Aug 2023 05:27:36 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 21.08.2023 um 21:01 schrieb Muttley@dastardlyhq.com:
>>> On Mon, 21 Aug 2023 20:22:36 +0200
>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>> Am 21.08.2023 um 20:12 schrieb Muttley@dastardlyhq.com:
>>>>
>>>>> On Mon, 21 Aug 2023 19:50:32 +0200
>>>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>
>>>>>> On my PC printing the all primes below 1E8 takes 0.827s with your
>>>>>> code. With my code it takes about 0.36s.
>>>>
>>>>> I'm fairly sure I could speed it up if I could be bothered.
>>>>
>>>> For sure not.
>>>
>>> And why's that then? ...
>>
>> Because you can only write simple code.
>
> Simpler code = more efficient, ...

I've shown that my code is 2.3 times more efficient.
In most cases more complex code is faster.

> ... less bugs ...

Show me the bugs. I can manage such code, you don't. I did use
iterators as mich as possible to have iterator debugging to find
bugs if they would have happened.

> Complexity in code isn't a goal, ...

It's inevitable if the code should be more efficient.

> If you were even half the genius coder you seem to think
> you are you'd already be aware of this.

I'm not a genius, but I have extreme calm in my head that
I can program something like this.

Re: Sieve of Eratosthenes

<uc1vep$2brns$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1097&group=comp.lang.c%2B%2B#1097

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 11:34:20 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uc1vep$2brns$3@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 09:34:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2486012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192SlzjFGQw6atT8vJwNHZBqwLisSycltQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GeULScSWsFrAk6aInXgKM/WbmLM=
Content-Language: de-DE
In-Reply-To: <uc1v1v$2brns$2@dont-email.me>
 by: Bonita Montero - Tue, 22 Aug 2023 09:34 UTC

Am 22.08.2023 um 11:27 schrieb Bonita Montero:

>> Simpler code = more efficient, ...

> I've shown that my code is 2.3 times more efficient.
> In most cases more complex code is faster.

On my secondary Linux PC (Threadripper 3990X) my code is 61% faster.

Re: Sieve of Eratosthenes

<uc20tm$2c4rd$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1098&group=comp.lang.c%2B%2B#1098

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 11:59:20 +0200
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <uc20tm$2c4rd$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me>
<64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>
<uc1uqm$2brns$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 22 Aug 2023 09:59:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2495341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Rv688w3946+vQ8DmPnFeGwmZ7K1tCJkc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:aKKTOlJKgfwdhhiCNAeLz+yjz0Q=
In-Reply-To: <uc1uqm$2brns$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 22 Aug 2023 09:59 UTC

Am 22.08.2023 um 11:23 schrieb Bonita Montero:
> Am 22.08.2023 um 08:25 schrieb Öö Tiib:
>> On Tuesday, 22 August 2023 at 06:27:51 UTC+3, Bonita Montero wrote:
>>> Am 21.08.2023 um 21:01 schrieb Mut...@dastardlyhq.com:
>>>> On Mon, 21 Aug 2023 20:22:36 +0200
>>>> Bonita Montero <Bonita....@gmail.com> wrote:
>>>>> Am 21.08.2023 um 20:12 schrieb Mut...@dastardlyhq.com:
>>>>>
>>>>>> On Mon, 21 Aug 2023 19:50:32 +0200
>>>>>> Bonita Montero <Bonita....@gmail.com> wrote:
>>>>>
>>>>>>> On my PC printing the all primes below 1E8 takes 0.827s with your
>>>>>>> code. With my code it takes about 0.36s.
>>>>>
>>>>>> I'm fairly sure I could speed it up if I could be bothered.
>>>>>
>>>>> For sure not.
>>>>
>>>> And why's that then? ...
>>>
>>> Because you can only write simple code.
>>
>> Do not hijack nice thread of finding primes with your optimising
>> textual output.
>
> The speedup over cout << p << endl is massive, at least with MSVC;
> I've measured that, you didn't.
>

C:\Users\Boni\Documents\Source\bitmapSieve>bg --times --affinity 1
--high x64\Release\bitmapSieve 100000000
real 9675.36ms
user 2875.00ms
sys 6718.75ms
cycles 43.369.468.839

C:\Users\Boni\Documents\Source\bitmapSieve>bg --times --affinity 1
--high x64\Release\bitmapSieve 100000000
real 370.28ms
user 281.25ms
sys 62.50ms
cycles 1.653.010.785

26 times faster on Windows (Zen4):

boni@EliteDesk:~$ g++ -march=native -std=c++20 -O2 bitmapSieve.cpp
boni@EliteDesk:~$ time ./a.out 100000000

real 0m17,552s
user 0m5,406s
sys 0m12,113s
boni@EliteDesk:~$ g++ -march=native -std=c++20 -O2 bitmapSieve.cpp
boni@EliteDesk:~$ time ./a.out 100000000

real 0m1,808s
user 0m1,680s
sys 0m0,085s

9.7 times faster on Linux (Skylake).

Re: Sieve of Eratosthenes

<e391d277-849c-4089-9ff5-6c2b9aa240b7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1099&group=comp.lang.c%2B%2B#1099

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:14c:b0:767:3d3d:7cc4 with SMTP id e12-20020a05620a014c00b007673d3d7cc4mr74245qkn.1.1692706508075;
Tue, 22 Aug 2023 05:15:08 -0700 (PDT)
X-Received: by 2002:a05:6a00:2d9a:b0:675:b734:d2fe with SMTP id
fb26-20020a056a002d9a00b00675b734d2femr5268245pfb.3.1692706507788; Tue, 22
Aug 2023 05:15:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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.c++
Date: Tue, 22 Aug 2023 05:15:07 -0700 (PDT)
In-Reply-To: <uc1uqm$2brns$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>
<uc1uqm$2brns$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e391d277-849c-4089-9ff5-6c2b9aa240b7n@googlegroups.com>
Subject: Re: Sieve of Eratosthenes
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Tue, 22 Aug 2023 12:15:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2936
 by: Öö Tiib - Tue, 22 Aug 2023 12:15 UTC

On Tuesday, 22 August 2023 at 12:23:53 UTC+3, Bonita Montero wrote:
> Am 22.08.2023 um 08:25 schrieb Öö Tiib:
> > On Tuesday, 22 August 2023 at 06:27:51 UTC+3, Bonita Montero wrote:
> >> Am 21.08.2023 um 21:01 schrieb Mut...@dastardlyhq.com:
> >>> On Mon, 21 Aug 2023 20:22:36 +0200
> >>> Bonita Montero <Bonita....@gmail.com> wrote:
> >>>> Am 21.08.2023 um 20:12 schrieb Mut...@dastardlyhq.com:
> >>>>
> >>>>> On Mon, 21 Aug 2023 19:50:32 +0200
> >>>>> Bonita Montero <Bonita....@gmail.com> wrote:
> >>>>
> >>>>>> On my PC printing the all primes below 1E8 takes 0.827s with your
> >>>>>> code. With my code it takes about 0.36s.
> >>>>
> >>>>> I'm fairly sure I could speed it up if I could be bothered.
> >>>>
> >>>> For sure not.
> >>>
> >>> And why's that then? ...
> >>
> >> Because you can only write simple code.
> >
> > Do not hijack nice thread of finding primes with your optimising
> > textual output.
>
> The speedup over cout << p << endl is massive, at least with MSVC;
> I've measured that, you didn't.
>
We already know that you are especially daff but I repeat: it does not
matter to efficiency of finding primes. Open other thread if you want
to discuss text output optimisations not finding primes.

Re: Sieve of Eratosthenes

<uc29b2$2df7f$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1100&group=comp.lang.c%2B%2B#1100

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 14:23:01 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <uc29b2$2df7f$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me>
<64246adc-0285-4d62-9280-b301c77dfb24n@googlegroups.com>
<uc1uqm$2brns$1@dont-email.me>
<e391d277-849c-4089-9ff5-6c2b9aa240b7n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 22 Aug 2023 12:22:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2538735"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HsgMLeJEhliEenONi6y9f9rHOM6Hvn6g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:vI0kQgdHwO2/szo78r8CBhYGm4Y=
In-Reply-To: <e391d277-849c-4089-9ff5-6c2b9aa240b7n@googlegroups.com>
Content-Language: de-DE
 by: Bonita Montero - Tue, 22 Aug 2023 12:23 UTC

Am 22.08.2023 um 14:15 schrieb Öö Tiib:

> We already know that you are especially daff but I repeat: it does not
> matter to efficiency of finding primes. Open other thread if you want
> to discuss text output optimisations not finding primes.

I'd optimized both inside the _same_ program. You and Muttley
think that simple coding is enough, I've shown multiple times
that I can do it much better.
Unfortunately printf() and cout << are by far not that fast
as they could be, even if the output is redirected to a file.

Re: Sieve of Eratosthenes

<uc2fqr$2egkl$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1102&group=comp.lang.c%2B%2B#1102

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 14:13:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <uc2fqr$2egkl$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me>
Injection-Date: Tue, 22 Aug 2023 14:13:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2572949"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hJAJr2ZWbiTe1T75pJ6zV"
Cancel-Lock: sha1:AR1KfIVW3Y8Fa8Go3Psd5VoxNZA=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 14:13 UTC

On Tue, 22 Aug 2023 11:27:29 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 22.08.2023 um 08:56 schrieb Muttley@dastardlyhq.com:
>> Simpler code = more efficient, ...
>
>I've shown that my code is 2.3 times more efficient.
>In most cases more complex code is faster.

No, not in most cases as endless bloated frameworks with their huge memory
and CPU requirements demonstrate on a daily basis to me. There's a big
difference between code thats fully featured and code thats needlessly
compicated because the developer(s) were unable to think clearly or see the
obvious solution.

>> Complexity in code isn't a goal, ...
>
>It's inevitable if the code should be more efficient.

Bollocks.

>> If you were even half the genius coder you seem to think
>> you are you'd already be aware of this.
>
>I'm not a genius, but I have extreme calm in my head that
>I can program something like this.

Oh right, you're a Zen dev are you? :) Whatever you say!

Re: Sieve of Eratosthenes

<uc2g1f$2eh5h$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1103&group=comp.lang.c%2B%2B#1103

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 16:17:21 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uc2g1f$2eh5h$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 14:17:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2573489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pbmHbc3VjFl0FXIqmvJwoxoMHIQ9kxow="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ia5t4NQaR65NU/Tx8iajccWuIAI=
In-Reply-To: <uc2fqr$2egkl$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 22 Aug 2023 14:17 UTC

Am 22.08.2023 um 16:13 schrieb Muttley@dastardlyhq.com:

> No, not in most cases as endless bloated frameworks ...

I'm using standard C++ and no bloating framworks. The memory-con-
sumtion is eight times less than with your code because I store
each bool as a bit. Your code has bloat, not mine in that sense.

> There's a big difference between code thats fully featured and code
> thats needlessly compicated because the developer(s) were unable to
> think clearly or see the obvious solution.

It overburdens you, not every developer.

Re: Sieve of Eratosthenes

<uc2gjn$2ekj3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1104&group=comp.lang.c%2B%2B#1104

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 14:27:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <uc2gjn$2ekj3$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me>
Injection-Date: Tue, 22 Aug 2023 14:27:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2576995"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/28DfYrEGRh2RDTRJVQ5Q"
Cancel-Lock: sha1:MKGnInVcsyLi8tX9CtQs7OPH81U=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 14:27 UTC

On Tue, 22 Aug 2023 16:17:21 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 22.08.2023 um 16:13 schrieb Muttley@dastardlyhq.com:
>
>> No, not in most cases as endless bloated frameworks ...
>
>I'm using standard C++ and no bloating framworks. The memory-con-
>sumtion is eight times less than with your code because I store
>each bool as a bit. Your code has bloat, not mine in that sense.

Accessing bits in a word is normally slower than accessing the whole word
on most CPUs. However due to the huge memory this sort of algo can use this
access time is probably more than offset by paging delays.

Using bits doesn't make you a genius.

>> There's a big difference between code thats fully featured and code
>> thats needlessly compicated because the developer(s) were unable to
>> think clearly or see the obvious solution.
>
>It overburdens you, not every developer.

Whoosh...

Re: Sieve of Eratosthenes

<uc2hsd$2eqis$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1105&group=comp.lang.c%2B%2B#1105

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 16:48:45 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uc2hsd$2eqis$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 14:48:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2583132"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Bem/q2AtfKJUzh/P3T+oaMwTfqWLzEro="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:51b24o4QiUeSWHIPSjE7qj5UsPw=
Content-Language: de-DE
In-Reply-To: <uc2gjn$2ekj3$1@dont-email.me>
 by: Bonita Montero - Tue, 22 Aug 2023 14:48 UTC

Am 22.08.2023 um 16:27 schrieb Muttley@dastardlyhq.com:

> Accessing bits in a word is normally slower than accessing the whole word
> on most CPUs. ...

I have shown that when the amount of data is large enough, access time
has the greatest weight. Furthermore, most of the calculations for the
bits within the byte in other arithmetic units take place in parallel.
If I choose the data set small enough, your algorithm is faster, but
then performance doesn't count anyway.

> Using bits doesn't make you a genius.

Did I claim that for myself ?

Re: Sieve of Eratosthenes

<uc2ico$2eu3a$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1106&group=comp.lang.c%2B%2B#1106

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 14:57:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <uc2ico$2eu3a$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
<uc2hsd$2eqis$1@dont-email.me>
Injection-Date: Tue, 22 Aug 2023 14:57:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2586730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R81lT8zloqlPxaDLDs5xH"
Cancel-Lock: sha1:RGPy6xc4SpK2PgraQGRAapaxcEM=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 14:57 UTC

On Tue, 22 Aug 2023 16:48:45 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 22.08.2023 um 16:27 schrieb Muttley@dastardlyhq.com:
>
>> Accessing bits in a word is normally slower than accessing the whole word
>> on most CPUs. ...
>
>I have shown that when the amount of data is large enough, access time
>has the greatest weight. Furthermore, most of the calculations for the
>bits within the byte in other arithmetic units take place in parallel.

CPUs only have 1 data bus no matter how many cores they have so the optimum
number of threads for this sort of algorithm is very much a suck it and
see approach depending on hardware and on a single core CPU your approach
would suck badly.

>> Using bits doesn't make you a genius.
>
>Did I claim that for myself ?

By denigrating anyone who doesn't like your coding style the implication is
there for all to see. You think yourself a better programmer than anyone
else on this group.

Re: Sieve of Eratosthenes

<uc2iiq$2eu9j$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1107&group=comp.lang.c%2B%2B#1107

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 17:00:42 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uc2iiq$2eu9j$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
<uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 15:00:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2586931"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TImbiCQFvWmHzZyXxK9ynsim2h8fBjEw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SpRTtT3tZMKFqaR7f10tk2+n/98=
Content-Language: de-DE
In-Reply-To: <uc2ico$2eu3a$1@dont-email.me>
 by: Bonita Montero - Tue, 22 Aug 2023 15:00 UTC

Am 22.08.2023 um 16:57 schrieb Muttley@dastardlyhq.com:

> CPUs only have 1 data bus no matter how many cores they have so the optimum
> number of threads for this sort of algorithm is very much a suck it and
> see approach depending on hardware and on a single core CPU your approach
> would suck badly.

Data is fetched in quantities of a cacheline size. And with my code
an eight of that quantity is fetched from memory. That's the reason
while my code is much faster than yours.

> By denigrating anyone who doesn't like your coding style the implication
> is there for all to see. You think yourself a better programmer than anyone
> else on this group.

That's obvious. I'm programming C++ since 1992 and I program at all
since I'm 10.

Re: Sieve of Eratosthenes

<VN4FM.455991$U3w1.188926@fx09.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1108&group=comp.lang.c%2B%2B#1108

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Sieve of Eratosthenes
Newsgroups: comp.lang.c++
References: <ubijff$3ahf3$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me> <ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me> <uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me> <uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me> <uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me> <uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me> <uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me> <uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
Lines: 29
Message-ID: <VN4FM.455991$U3w1.188926@fx09.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 22 Aug 2023 15:49:09 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 22 Aug 2023 15:49:09 GMT
X-Received-Bytes: 2349
 by: Scott Lurndal - Tue, 22 Aug 2023 15:49 UTC

Muttley@dastardlyhq.com writes:
>On Tue, 22 Aug 2023 16:48:45 +0200
>Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>Am 22.08.2023 um 16:27 schrieb Muttley@dastardlyhq.com:
>>
>>> Accessing bits in a word is normally slower than accessing the whole word
>>> on most CPUs. ...
>>
>>I have shown that when the amount of data is large enough, access time
>>has the greatest weight. Furthermore, most of the calculations for the
>>bits within the byte in other arithmetic units take place in parallel.
>
>CPUs only have 1 data bus no matter how many cores

That is not an accurate statement for any processor built in
the last decade or more. Most of them use a mesh, crossbar or ring structure, not
a shared bus structure to interface the cores to the memory subsystem on the
chip. Most have multiple DRAM controllers (from one at
the real low end to twenty at the high end) and stripe
the DRAM address space across the controllers. All CPUs have private
L1 and L2 caches, and large shared LLC caches (LLC is distributed
across mesh elements) whic signifinctly reduce DRAM controller accesses.

Likewise, on the I/O side, there are multiple bridges from the
mesh/ring structures into the I/O side (e.g. one host bridge per
PCI Express root port, one or more for on-chip accelerators, etc).

Re: Sieve of Eratosthenes

<uc2ss5$2grks$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1109&group=comp.lang.c%2B%2B#1109

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 17:56:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <uc2ss5$2grks$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
<uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
<uc2iiq$2eu9j$1@dont-email.me>
Injection-Date: Tue, 22 Aug 2023 17:56:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2649756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FRjf/Z+v5Zvi1BGPohiGd"
Cancel-Lock: sha1:zg7QzckLpL86Z4LIubppd7KrYvE=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 17:56 UTC

On Tue, 22 Aug 2023 17:00:42 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 22.08.2023 um 16:57 schrieb Muttley@dastardlyhq.com:
>
>> CPUs only have 1 data bus no matter how many cores they have so the optimum
>> number of threads for this sort of algorithm is very much a suck it and
>> see approach depending on hardware and on a single core CPU your approach
>> would suck badly.
>
>Data is fetched in quantities of a cacheline size. And with my code

If it has to be paged from disk in the first place the size of the cache is a
total irrelevance as far as time taken is concerned.

>an eight of that quantity is fetched from memory. That's the reason
>while my code is much faster than yours.

As I said, it depends on the hardware. Try both on a Z80 and see what happens.

>> By denigrating anyone who doesn't like your coding style the implication
>> is there for all to see. You think yourself a better programmer than anyone
>> else on this group.
>
>That's obvious.

Thanks for proving you're as arrogant as I thought.

>I'm programming C++ since 1992 and I program at all
>since I'm 10.

If you want to get into a pissing contest about who's been programming longer
I suspect a lot of people on this group have been doing it a lot longer than
you.

Re: Sieve of Eratosthenes

<uc2t0t$2gsa4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1110&group=comp.lang.c%2B%2B#1110

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 17:58:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <uc2t0t$2gsa4$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me> <ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me> <uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me> <uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me> <uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me> <uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me> <uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me> <uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
<VN4FM.455991$U3w1.188926@fx09.iad>
Injection-Date: Tue, 22 Aug 2023 17:58:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2650436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hCjeaCuVQ2sG01qrlRxrr"
Cancel-Lock: sha1:RUGj8e9JehYg2xmlBSToqcs0G3Q=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 17:58 UTC

On Tue, 22 Aug 2023 15:49:09 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
>Muttley@dastardlyhq.com writes:
>>On Tue, 22 Aug 2023 16:48:45 +0200
>>Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>Am 22.08.2023 um 16:27 schrieb Muttley@dastardlyhq.com:
>>>
>>>> Accessing bits in a word is normally slower than accessing the whole word
>>>> on most CPUs. ...
>>>
>>>I have shown that when the amount of data is large enough, access time
>>>has the greatest weight. Furthermore, most of the calculations for the
>>>bits within the byte in other arithmetic units take place in parallel.
>>
>>CPUs only have 1 data bus no matter how many cores
>
>That is not an accurate statement for any processor built in
>the last decade or more. Most of them use a mesh, crossbar or ring

Given millions of 8 and 16 bit processors are still designed and produced for
embedded systems that statement is nonsense and ARM based systems can use
whatever parts they want in the CPU.

>structure, not
>a shared bus structure to interface the cores to the memory subsystem on the
>chip. Most have multiple DRAM controllers (from one at
>the real low end to twenty at the high end) and stripe
>the DRAM address space across the controllers. All CPUs have private
>L1 and L2 caches, and large shared LLC caches (LLC is distributed
>across mesh elements) whic signifinctly reduce DRAM controller accesses.
>
>Likewise, on the I/O side, there are multiple bridges from the
>mesh/ring structures into the I/O side (e.g. one host bridge per
>PCI Express root port, one or more for on-chip accelerators, etc).

Thats nice, but CPU > x86.

Re: Sieve of Eratosthenes

<uc2tru$2h0an$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1111&group=comp.lang.c%2B%2B#1111

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 20:13:17 +0200
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <uc2tru$2h0an$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
<uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
<uc2iiq$2eu9j$1@dont-email.me> <uc2ss5$2grks$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 18:13:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2654551"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/JSlOiTIVQJIFmu7qGKyppRDAU6if22dA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:p+c7c+vUNgtlnpVxcodHUtMU5Fg=
Content-Language: de-DE
In-Reply-To: <uc2ss5$2grks$1@dont-email.me>
 by: Bonita Montero - Tue, 22 Aug 2023 18:13 UTC

Am 22.08.2023 um 19:56 schrieb Muttley@dastardlyhq.com:

> If it has to be paged from disk in the first place the size of the
> cache is a total irrelevance as far as time taken is concerned.

No one uses software that actually pages to disk.
Paging is just for that the softwar doesn't crash.

> As I said, it depends on the hardware. Try both on a Z80 and see what happens.

Your code wasn't intended for a Z-80.

> Thanks for proving you're as arrogant as I thought.

When you're good in sth. you often appear arrogant.

> If you want to get into a pissing contest about who's been programming
> longer I suspect a lot of people on this group have been doing it a lot
> longer than you.

Maybe, but at this level.

Re: Sieve of Eratosthenes

<uc2u4r$2h243$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1112&group=comp.lang.c%2B%2B#1112

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 18:18:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <uc2u4r$2h243$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
<uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
<uc2iiq$2eu9j$1@dont-email.me> <uc2ss5$2grks$1@dont-email.me>
<uc2tru$2h0an$1@dont-email.me>
Injection-Date: Tue, 22 Aug 2023 18:18:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e6cd5cf7a713c48a3d1d62a5ef45a757";
logging-data="2656387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18d6Sd9yEwLikMPgh6riWnU"
Cancel-Lock: sha1:uiN0W6gqo1LHooPruQLKEkfmLSQ=
 by: Mutt...@dastardlyhq.com - Tue, 22 Aug 2023 18:18 UTC

On Tue, 22 Aug 2023 20:13:17 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 22.08.2023 um 19:56 schrieb Muttley@dastardlyhq.com:
>
>> If it has to be paged from disk in the first place the size of the
>> cache is a total irrelevance as far as time taken is concerned.
>
>No one uses software that actually pages to disk.
>Paging is just for that the softwar doesn't crash.

I suggest you go and google how operating system virtual memory works.

>> As I said, it depends on the hardware. Try both on a Z80 and see what
>happens.
>
>Your code wasn't intended for a Z-80.

What was it intended for then given it was written in basic C?

>> Thanks for proving you're as arrogant as I thought.
>
>When you're good in sth. you often appear arrogant.

"sth"?

>> If you want to get into a pissing contest about who's been programming
>> longer I suspect a lot of people on this group have been doing it a lot
>> longer than you.
>
>Maybe, but at this level.

At your level? Absolutely.

Re: Sieve of Eratosthenes

<_37FM.570529$SuUf.449990@fx14.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1113&group=comp.lang.c%2B%2B#1113

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Sieve of Eratosthenes
Newsgroups: comp.lang.c++
References: <ubijff$3ahf3$1@dont-email.me> <uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me> <uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me> <uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me> <uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me> <uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me> <uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me> <VN4FM.455991$U3w1.188926@fx09.iad> <uc2t0t$2gsa4$1@dont-email.me>
Lines: 56
Message-ID: <_37FM.570529$SuUf.449990@fx14.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 22 Aug 2023 18:24:58 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 22 Aug 2023 18:24:58 GMT
X-Received-Bytes: 3533
 by: Scott Lurndal - Tue, 22 Aug 2023 18:24 UTC

Muttley@dastardlyhq.com writes:
>On Tue, 22 Aug 2023 15:49:09 GMT
>scott@slp53.sl.home (Scott Lurndal) wrote:
>>Muttley@dastardlyhq.com writes:
>>>On Tue, 22 Aug 2023 16:48:45 +0200
>>>Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>Am 22.08.2023 um 16:27 schrieb Muttley@dastardlyhq.com:
>>>>
>>>>> Accessing bits in a word is normally slower than accessing the whole word
>>>>> on most CPUs. ...
>>>>
>>>>I have shown that when the amount of data is large enough, access time
>>>>has the greatest weight. Furthermore, most of the calculations for the
>>>>bits within the byte in other arithmetic units take place in parallel.
>>>
>>>CPUs only have 1 data bus no matter how many cores
>>
>>That is not an accurate statement for any processor built in
>>the last decade or more. Most of them use a mesh, crossbar or ring
>
>Given millions of 8 and 16 bit processors are still designed and produced for
>embedded systems that statement is nonsense and ARM based systems can use
>whatever parts they want in the CPU.

ARM based multicore systems generally use CMN-400/500/600/700 IP (from ARM)
as the processor interconnect.

https://developer.arm.com/Processors/CoreLink%20CMN-600

And all those 8 and 16-bit processors are single core, so your
statement above, which references "no matter how many cores"
doesn't apply to them.

>
>>structure, not
>>a shared bus structure to interface the cores to the memory subsystem on the
>>chip. Most have multiple DRAM controllers (from one at
>>the real low end to twenty at the high end) and stripe
>>the DRAM address space across the controllers. All CPUs have private
>>L1 and L2 caches, and large shared LLC caches (LLC is distributed
>>across mesh elements) whic signifinctly reduce DRAM controller accesses.
>>
>>Likewise, on the I/O side, there are multiple bridges from the
>>mesh/ring structures into the I/O side (e.g. one host bridge per
>>PCI Express root port, one or more for on-chip accelerators, etc).
>
>Thats nice, but CPU > x86.

What does that mean? Every major multicore processor currently
shipping (including Apple M7+) operate as described above.
Including most mid-range and high-end application specific
system-on-chips (SoC), including those using the ARM
architecture.

The proceedings from https://hotchips.org/ over the last two
decades describe the state of the art.

Re: Sieve of Eratosthenes

<uc302f$2hahp$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1114&group=comp.lang.c%2B%2B#1114

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Eratosthenes
Date: Tue, 22 Aug 2023 20:50:55 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <uc302f$2hahp$1@dont-email.me>
References: <ubijff$3ahf3$1@dont-email.me> <ubjedg$3emtj$1@dont-email.me>
<ubjrqh$3g7ve$1@redfloyd.dont-email.me> <ubkfhd$3mcbv$1@dont-email.me>
<ubkpqj$3nra0$1@dont-email.me> <ubku1s$3oe7t$1@dont-email.me>
<ubv92t$1r3l9$1@dont-email.me> <uc06bc$203p7$1@dont-email.me>
<uc0857$20cmk$1@dont-email.me> <uc09e1$20jj6$1@dont-email.me>
<uc0a19$20m3n$1@dont-email.me> <uc0ca1$213lo$1@dont-email.me>
<uc19v6$28t5s$1@dont-email.me> <uc1m68$2afn4$1@dont-email.me>
<uc1v1v$2brns$2@dont-email.me> <uc2fqr$2egkl$1@dont-email.me>
<uc2g1f$2eh5h$1@dont-email.me> <uc2gjn$2ekj3$1@dont-email.me>
<uc2hsd$2eqis$1@dont-email.me> <uc2ico$2eu3a$1@dont-email.me>
<uc2iiq$2eu9j$1@dont-email.me> <uc2ss5$2grks$1@dont-email.me>
<uc2tru$2h0an$1@dont-email.me> <uc2u4r$2h243$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 18:50:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="62bbf9da102e47dcc248bf7a87d7d8d8";
logging-data="2665017"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h9uZe/jQIYv3l0kC9BMnCA7ctHYUoeW8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Lj9DiQESCZeOcVLmeGh3a6+gYI8=
In-Reply-To: <uc2u4r$2h243$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 22 Aug 2023 18:50 UTC

Am 22.08.2023 um 20:18 schrieb Muttley@dastardlyhq.com:
> On Tue, 22 Aug 2023 20:13:17 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 22.08.2023 um 19:56 schrieb Muttley@dastardlyhq.com:
>>
>>> If it has to be paged from disk in the first place the size of the
>>> cache is a total irrelevance as far as time taken is concerned.
>>
>> No one uses software that actually pages to disk.
>> Paging is just for that the softwar doesn't crash.
>
> I suggest you go and google how operating system virtual memory works.

Swapping is for stability and not for performance.
No one considers running applications actually swapping.

> What was it intended for then given it was written in basic C?

You didn't write that on a Z-80.


devel / comp.lang.c++ / Re: Sieve of Eratosthenes

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor