Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #91263 > unrolled thread

Sieve of Eratosthenes

Started byBonita Montero <Bonita.Montero@gmail.com>
First post2023-08-16 15:37 +0200
Last post2023-08-30 19:02 +0200
Articles 20 on this page of 146 — 13 participants

Back to article view | Back to comp.lang.c++


Contents

  Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-16 15:37 +0200
    Re: Sieve of Eratosthenes wij <wyniijj5@gmail.com> - 2023-08-16 10:57 -0700
      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-16 20:21 +0200
        Re: Sieve of Eratosthenes wij <wyniijj5@gmail.com> - 2023-08-16 12:17 -0700
      Re: Sieve of Eratosthenes Paavo Helde <eesnimi@osa.pri.ee> - 2023-08-16 21:44 +0300
        Re: Sieve of Eratosthenes wij <wyniijj5@gmail.com> - 2023-08-16 12:09 -0700
    Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-16 23:17 +0200
      Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-16 23:21 +0200
      Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-16 23:39 +0200
        Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-16 23:59 +0200
          Re: Sieve of Eratosthenes "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-08-16 16:27 -0700
      Re: Sieve of Eratosthenes red floyd <no.spam.here@its.invalid> - 2023-08-16 18:06 -0700
        Re: Sieve of Eratosthenes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-16 19:26 -0700
          Re: Sieve of Eratosthenes Öö Tiib <ootiib@hot.ee> - 2023-08-27 12:26 -0700
            Re: Sieve of Eratosthenes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-28 00:49 +0100
              Re: Sieve of Eratosthenes Öö Tiib <ootiib@hot.ee> - 2023-08-27 23:23 -0700
                Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-28 15:53 +0200
                  Re: Sieve of Eratosthenes Öö Tiib <ootiib@hot.ee> - 2023-08-28 09:03 -0700
                    Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-28 18:47 +0200
                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-30 13:01 +0200
                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-30 15:38 +0000
                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-30 18:31 +0200
                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-31 08:22 +0000
                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 11:00 +0200
                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-31 15:23 +0000
                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 17:28 +0200
                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 11:52 +0200
                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-31 15:22 +0000
                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 17:32 +0200
                                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-31 15:44 +0000
                                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 17:50 +0200
                                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 10:26 +0000
                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 12:59 +0200
                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 12:30 +0000
                                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 15:33 +0200
                                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 13:49 +0000
                                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 15:59 +0200
                                                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 14:03 +0000
                                                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 16:15 +0200
                                                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 14:39 +0000
                                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 16:59 +0200
                                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 15:01 +0000
                                                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 17:05 +0200
                                                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-09-01 15:08 +0000
                                                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 17:15 +0200
                                Re: Sieve of Eratosthenes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-31 21:33 +0100
                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-09-01 05:35 +0200
                              Re: Sieve of Eratosthenes scott@slp53.sl.home (Scott Lurndal) - 2023-08-31 14:43 +0000
                                Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 16:57 +0200
                                  Re: Sieve of Eratosthenes scott@slp53.sl.home (Scott Lurndal) - 2023-08-31 16:10 +0000
                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-31 15:25 +0000
                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-31 17:33 +0200
                                    Re: Sieve of Eratosthenes scott@slp53.sl.home (Scott Lurndal) - 2023-08-31 16:12 +0000
                  Re: Sieve of Eratosthenes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-28 23:08 +0100
              Re: Sieve of Eratosthenes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-28 15:15 -0700
                Re: Sieve of Eratosthenes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-28 23:41 +0100
                  Re: Sieve of Eratosthenes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-30 17:45 -0700
                    Re: Sieve of Eratosthenes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-31 03:18 +0100
            Re: Sieve of Eratosthenes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-28 15:08 -0700
        Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-17 08:42 +0200
          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-17 11:38 +0200
            Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-17 12:50 +0200
              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-17 13:10 +0200
              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-17 17:47 +0200
              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-21 11:00 +0200
                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-21 17:19 +0000
                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-21 19:50 +0200
                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-21 18:12 +0000
                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-21 20:22 +0200
                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-21 19:01 +0000
                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 05:27 +0200
                            Re: Sieve of Eratosthenes Öö Tiib <ootiib@hot.ee> - 2023-08-21 23:25 -0700
                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 11:23 +0200
                                Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 11:59 +0200
                                Re: Sieve of Eratosthenes Öö Tiib <ootiib@hot.ee> - 2023-08-22 05:15 -0700
                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 14:23 +0200
                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 06:56 +0000
                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 11:27 +0200
                                Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 11:34 +0200
                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 14:13 +0000
                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 16:17 +0200
                                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 14:27 +0000
                                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 16:48 +0200
                                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 14:57 +0000
                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 17:00 +0200
                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 17:56 +0000
                                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 20:13 +0200
                                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 18:18 +0000
                                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-22 20:50 +0200
                                                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 06:51 +0000
                                                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 09:59 +0200
                                                        Re: Sieve of Eratosthenes Richard Damon <Richard@Damon-Family.org> - 2023-08-23 07:52 -0400
                                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 14:40 +0200
                                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 14:24 +0000
                                                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 16:30 +0200
                                                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 14:36 +0000
                                                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 16:38 +0200
                                                                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 14:43 +0000
                                                                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 16:45 +0200
                                                                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 17:49 +0000
                                                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 20:05 +0200
                                                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-24 17:18 +0000
                                                                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-24 19:20 +0200
                                                                          Re: Sieve of Eratosthenes Daniel <danielaparker@gmail.com> - 2023-08-23 11:13 -0700
                                                                            Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 20:17 +0200
                                                                              Re: Sieve of Eratosthenes "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-08-23 11:20 -0700
                                                                                Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 20:24 +0200
                                                                                  Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-24 17:25 +0000
                                                                                    Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-24 19:29 +0200
                                                                                      Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-24 17:40 +0000
                                                                                        Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-24 19:49 +0200
                                                                                          Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-25 16:07 +0000
                                                                                            Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-25 18:10 +0200
                                                                                              Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-25 16:15 +0000
                                                                                                Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-25 18:18 +0200
                                                                                                  Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-26 08:03 +0000
                                                                                                    Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-26 10:16 +0200
                                                                                                      Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-26 08:27 +0000
                                                                                Re: Sieve of Eratosthenes Daniel <danielaparker@gmail.com> - 2023-08-23 11:37 -0700
                                                                                  Re: Sieve of Eratosthenes "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-08-26 15:33 -0700
                                                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 14:20 +0000
                                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 16:32 +0200
                                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 14:41 +0000
                                                              Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 16:47 +0200
                                                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 17:51 +0000
                                                                  Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-23 20:09 +0200
                                                                    Re: Sieve of Eratosthenes scott@slp53.sl.home (Scott Lurndal) - 2023-08-23 18:51 +0000
                                                                      Re: Sieve of Eratosthenes "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-08-24 11:25 -0700
                                                                    Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-24 17:22 +0000
                                                                      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-24 19:27 +0200
                                                                        Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-24 17:37 +0000
                                                                          Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-24 19:52 +0200
                                                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-25 16:07 +0000
                                                          Re: Sieve of Eratosthenes Daniel <danielaparker@gmail.com> - 2023-08-23 08:00 -0700
                                          Re: Sieve of Eratosthenes scott@slp53.sl.home (Scott Lurndal) - 2023-08-22 15:49 +0000
                                            Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-22 17:58 +0000
                                              Re: Sieve of Eratosthenes scott@slp53.sl.home (Scott Lurndal) - 2023-08-22 18:24 +0000
                                                Re: Sieve of Eratosthenes Muttley@dastardlyhq.com - 2023-08-23 06:50 +0000
      Re: Sieve of Eratosthenes wij <wyniijj5@gmail.com> - 2023-08-17 13:43 -0700
        Re: Sieve of Eratosthenes "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-08-18 02:00 +0200
          Re: Sieve of Eratosthenes wij <wyniijj5@gmail.com> - 2023-08-18 05:01 -0700
            Re: Sieve of Eratosthenes wij <wyniijj5@gmail.com> - 2023-08-18 17:02 -0700
    Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-28 06:15 +0200
    Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-28 09:43 +0200
    Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-29 20:34 +0200
      Re: Sieve of Eratosthenes Bonita Montero <Bonita.Montero@gmail.com> - 2023-08-30 19:02 +0200

Page 3 of 8 — ← Prev page 1 2 [3] 4 5 6 7 8  Next page →


#91509

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-09-01 16:59 +0200
Message-ID<ucsu88$3qg6l$1@dont-email.me>
In reply to#91508
Am 01.09.2023 um 16:39 schrieb Muttley@dastardlyhq.com:

> If you don't want people commenting on your code then don't bloody post it!

You don't even read it as seen from that you noticed my usage
of the comma-oerator very late.
And according to your n00b C++ questions you don't understand it.

[toc] | [prev] | [next] | [standalone]


#91510

FromMuttley@dastardlyhq.com
Date2023-09-01 15:01 +0000
Message-ID<ucsubm$3qhe0$1@dont-email.me>
In reply to#91509
On Fri, 1 Sep 2023 16:59:21 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 01.09.2023 um 16:39 schrieb Muttley@dastardlyhq.com:
>
>> If you don't want people commenting on your code then don't bloody post it!
>
>You don't even read it as seen from that you noticed my usage
>of the comma-oerator very late.

First time I bothered to look. I won't be bothering again.

>And according to your n00b C++ questions you don't understand it.

Whatever you say genius.

[toc] | [prev] | [next] | [standalone]


#91511

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-09-01 17:05 +0200
Message-ID<ucsuiu$3qi3e$1@dont-email.me>
In reply to#91510
Am 01.09.2023 um 17:01 schrieb Muttley@dastardlyhq.com:
> On Fri, 1 Sep 2023 16:59:21 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 01.09.2023 um 16:39 schrieb Muttley@dastardlyhq.com:
>>
>>> If you don't want people commenting on your code then don't bloody post it!
>>
>> You don't even read it as seen from that you noticed my usage
>> of the comma-oerator very late.
> 
> First time I bothered to look. I won't be bothering again.

Exactly what I said: you comment my code without having read it.

>> And according to your n00b C++ questions you don't understand it.

> Whatever you say genius.

I'm just calm, sane and intelligent.

[toc] | [prev] | [next] | [standalone]


#91512

FromMuttley@dastardlyhq.com
Date2023-09-01 15:08 +0000
Message-ID<ucsup3$3qj5c$1@dont-email.me>
In reply to#91511
On Fri, 1 Sep 2023 17:05:03 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 01.09.2023 um 17:01 schrieb Muttley@dastardlyhq.com:
>> On Fri, 1 Sep 2023 16:59:21 +0200
>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> Am 01.09.2023 um 16:39 schrieb Muttley@dastardlyhq.com:
>>>
>>>> If you don't want people commenting on your code then don't bloody post it!
>
>>>
>>> You don't even read it as seen from that you noticed my usage
>>> of the comma-oerator very late.
>> 
>> First time I bothered to look. I won't be bothering again.
>
>Exactly what I said: you comment my code without having read it.
>
>>> And according to your n00b C++ questions you don't understand it.
>
>> Whatever you say genius.
>
>I'm just calm, sane and intelligent.

A psychology student could write their thesis about you.

[toc] | [prev] | [next] | [standalone]


#91513

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-09-01 17:15 +0200
Message-ID<ucsv5m$3qkrj$1@dont-email.me>
In reply to#91512
Am 01.09.2023 um 17:08 schrieb Muttley@dastardlyhq.com:
> On Fri, 1 Sep 2023 17:05:03 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 01.09.2023 um 17:01 schrieb Muttley@dastardlyhq.com:
>>> On Fri, 1 Sep 2023 16:59:21 +0200
>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>> Am 01.09.2023 um 16:39 schrieb Muttley@dastardlyhq.com:
>>>>
>>>>> If you don't want people commenting on your code then don't bloody post it!
>>
>>>>
>>>> You don't even read it as seen from that you noticed my usage
>>>> of the comma-oerator very late.
>>>
>>> First time I bothered to look. I won't be bothering again.
>>
>> Exactly what I said: you comment my code without having read it.
>>
>>>> And according to your n00b C++ questions you don't understand it.
>>
>>> Whatever you say genius.
>>
>> I'm just calm, sane and intelligent.
> 
> A psychology student could write their thesis about you.
> 

Not at all, I just feel good.

[toc] | [prev] | [next] | [standalone]


#91496

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-08-31 21:33 +0100
Message-ID<87il8vkl3t.fsf@bsb.me.uk>
In reply to#91482
Bonita Montero <Bonita.Montero@gmail.com> writes:

> I just benchmarked my code with an upper bound of 1E3 against your code
> on a Skylake CPU with g++ 12 and -march=native. My code runs about 0.9s,
> your code takes 5.26s. Any questions ?

Is the 1E3 a typo?  And if not, does it mean 1000 as I would interpret
it?  A prime sieve up to 1000 should be almost un-measurably fast.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#91499

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-09-01 05:35 +0200
Message-ID<ucrm6k$3kso1$1@dont-email.me>
In reply to#91496
Am 31.08.2023 um 22:33 schrieb Ben Bacarisse:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
> 
>> I just benchmarked my code with an upper bound of 1E3 against your code
>> on a Skylake CPU with g++ 12 and -march=native. My code runs about 0.9s,
>> your code takes 5.26s. Any questions ?
> 
> Is the 1E3 a typo?  

Yes, 1E8.

[toc] | [prev] | [next] | [standalone]


#91483

Fromscott@slp53.sl.home (Scott Lurndal)
Date2023-08-31 14:43 +0000
Message-ID<qG1IM.472123$xMqa.47393@fx12.iad>
In reply to#91479
Muttley@dastardlyhq.com writes:
>On Wed, 30 Aug 2023 18:31:32 +0200
>Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>Am 30.08.2023 um 17:38 schrieb Muttley@dastardlyhq.com:
>>> On Wed, 30 Aug 2023 13:01:16 +0200
>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>> 	if( argc < 3 || *argv[2] )
>>>> 		ofs.exceptions( ofstream::failbit | ofstream::badbit ),
>>>> 		ofs.open( argc >= 3 ? argv[2] : "primes.txt", ofstream::trunc ),
>>>> 		printBuf.reserve( BUF_SIZE + 31 );
>>
>>> Commas as statement seperators instead of using a bracketed block?
>>> Are you posting this code for lols?
>>
>>I often concatenate a small number of statements with the comma-operator
>>to save screen space. I never had any issues with that. That's just a
>
>To save space? Seriously??

cfront used to generate extensive comma laden expressions.   It did
cause problems with PCC's temporary register allocation algorithms
that I had to fix back around 1989.

[toc] | [prev] | [next] | [standalone]


#91484

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-08-31 16:57 +0200
Message-ID<ucq9pc$3b661$1@dont-email.me>
In reply to#91483
Am 31.08.2023 um 16:43 schrieb Scott Lurndal:

> cfront used to generate extensive comma laden expressions.   It did
> cause problems with PCC's temporary register allocation algorithms
> that I had to fix back around 1989.

There's for sure no compiler that generates different code whether
you youse individual ;-separated statements or one comma-separated
statement as both are sequence points.

[toc] | [prev] | [next] | [standalone]


#91493

Fromscott@slp53.sl.home (Scott Lurndal)
Date2023-08-31 16:10 +0000
Message-ID<gY2IM.854600$TPw2.416605@fx17.iad>
In reply to#91484
Bonita Montero <Bonita.Montero@gmail.com> writes:
>Am 31.08.2023 um 16:43 schrieb Scott Lurndal:
>
>> cfront used to generate extensive comma laden expressions.   It did
>> cause problems with PCC's temporary register allocation algorithms
>> that I had to fix back around 1989.
>
>There's for sure no compiler that generates different code whether
>you youse individual ;-separated statements or one comma-separated
>statement as both are sequence points.
>

Are you familiar with the term non-sequitur?

I don't believe code generation was ever referred to in the post
you replied to, and therefore your reply is non-responsive.

[toc] | [prev] | [next] | [standalone]


#91487

FromMuttley@dastardlyhq.com
Date2023-08-31 15:25 +0000
Message-ID<ucqbdv$3bfgc$1@dont-email.me>
In reply to#91483
On Thu, 31 Aug 2023 14:43:34 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
>Muttley@dastardlyhq.com writes:
>>On Wed, 30 Aug 2023 18:31:32 +0200
>>Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>Am 30.08.2023 um 17:38 schrieb Muttley@dastardlyhq.com:
>>>> On Wed, 30 Aug 2023 13:01:16 +0200
>>>> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>> 	if( argc < 3 || *argv[2] )
>>>>> 		ofs.exceptions( ofstream::failbit | ofstream::badbit ),
>>>>> 		ofs.open( argc >= 3 ? argv[2] : "primes.txt", ofstream::trunc ),
>>>>> 		printBuf.reserve( BUF_SIZE + 31 );
>>>
>>>> Commas as statement seperators instead of using a bracketed block?
>>>> Are you posting this code for lols?
>>>
>>>I often concatenate a small number of statements with the comma-operator
>>>to save screen space. I never had any issues with that. That's just a
>>
>>To save space? Seriously??
>
>cfront used to generate extensive comma laden expressions.   It did

I don't even understand why C/C++ allows comma seperation of calls in a block. 
It should be restricted to a few specific locations such as inside for().

[toc] | [prev] | [next] | [standalone]


#91490

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-08-31 17:33 +0200
Message-ID<ucqbrf$3bg6h$3@dont-email.me>
In reply to#91487
Am 31.08.2023 um 17:25 schrieb Muttley@dastardlyhq.com:

> I don't even understand why C/C++ allows comma seperation of calls in a block.

I think you would change the world that there are less annoyances for
you.

[toc] | [prev] | [next] | [standalone]


#91494

Fromscott@slp53.sl.home (Scott Lurndal)
Date2023-08-31 16:12 +0000
Message-ID<NZ2IM.854601$TPw2.723397@fx17.iad>
In reply to#91490
Bonita Montero <Bonita.Montero@gmail.com> writes:
>Am 31.08.2023 um 17:25 schrieb Muttley@dastardlyhq.com:
>
>> I don't even understand why C/C++ allows comma seperation of calls in a block.
>
>I think you would change the world that there are less annoyances for
>you.
>

pot kettle black

[toc] | [prev] | [next] | [standalone]


#91461

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-08-28 23:08 +0100
Message-ID<87cyz6n7kj.fsf@bsb.me.uk>
In reply to#91457
"Alf P. Steinbach" <alf.p.steinbach@gmail.com> writes:

> On 2023-08-28 8:23 AM, Öö Tiib wrote:
>> On Monday, 28 August 2023 at 02:50:05 UTC+3, Ben Bacarisse wrote:
>>> Öö Tiib <oot...@hot.ee> writes:
>>>
>>>> On Thursday, 17 August 2023 at 05:26:37 UTC+3, Tim Rentsch wrote:
>>>>>
>>>>> I suggest computing all 32 bit primes for the benchmark
>>>>> tests. Shouldn't take too long.
>>>>>
>>>> Took 14 minutes to find those 203280221 primes single threaded
>>>> on i7-8550U.
>>> What do you mean by find? Do you include printing them out because that
>>> will depend rather more on the OS.
>>>
>> I did try to invent a sieve algorithm this weekend, it worked, but bit
>> sluggish, so I posted it.
>> I did not measure printing or storing to file, only sieving and counting
>> (to test that there are 203280221).
>> 
>>> I wanted to try a newer algorithm, so I coded up a rather naive version
>>> of Atkin & Bernstein's sieve in C. It needs some tidying and I imagine
>>> a bit can be shaved off the time.
>>>
>>> It can generate a bitmap of the 203280221 primes and then count them in
>>> about 40 seconds on an i5-8265U CPU @ 1.60GHz (single threaded). It
>>> takes about 55 seconds to write them (in decimal) to a file. The result
>>> is over 2GB:
>>>
>>> $ wc primes
>>> 203280221 203280221 2178719347 primes
>>>
>> Thanks, so I apparently need to optimize my algorithm at least 30 times
>> faster for it to be worth anything. Maybe next weekend.
>
> The code I posted earlier, with limits changed to compute primes up to 32^2
> - 1 and with `int` changed to `int64_t`, reports
>
> 28.9473339 seconds.
> 203280221 primes.
>
> msinfo32 says "Processor Intel(R) Core(TM) i7-8700T CPU @ 2.40GHz, 2400
> Mhz, 6 Core(s), 12 Logical Processor(s)"
>
> so accounting for clock rate it seems a little bit slower than Ben's.

On my machine, compiled with -O3, it takes just over 2 minutes.  (I had
to remove the timing code and replace the fmt/core.h use with a call to
printf.)

It's not easy to compare i7 and i5 speeds from the clock rate alone.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#91463

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2023-08-28 15:15 -0700
Message-ID<861qfmyft6.fsf@linuxsc.com>
In reply to#91452
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> I wanted to try a newer algorithm, so I coded up a rather naive
> version of Atkin & Bernstein's sieve in C.  It needs some tidying
> and I imagine a bit can be shaved off the time.

Thank you for this.  Would you mind posting your code?  Also do
you have a reference for the Atkin/Bernstein algorithm (or even
better, code?)?

[toc] | [prev] | [next] | [standalone]


#91464

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-08-28 23:41 +0100
Message-ID<873502n61v.fsf@bsb.me.uk>
In reply to#91463
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>
>> I wanted to try a newer algorithm, so I coded up a rather naive
>> version of Atkin & Bernstein's sieve in C.  It needs some tidying
>> and I imagine a bit can be shaved off the time.
>
> Thank you for this.  Would you mind posting your code?

Hmm...  It's a bit of a mess... but sure.

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

typedef unsigned           int     nat;
typedef unsigned long long int big_nat;

nat isqrt(nat n)
{
     if (n < 2)
          return n;
     nat s = (isqrt(n >> 2) << 1) + 1;
     return s - (s*s > n);
}

static inline void *bitset(nat n)
{
     return calloc(1, n/8 + 1);
}

static inline void bitset_clear(void *set, nat n)
{
     ((unsigned char *)set)[n/8] &= ~(1 << n%8);
}

static inline void bitset_flip(void *set, nat n)
{
     ((unsigned char *)set)[n/8] ^= 1 << n%8;
}

static inline bool bitset_test(const void *set, nat n)
{
     return ((const unsigned char *)set)[n/8] & (1 << n%8);
}

void *primes_up_to(nat n)
{
#define B(n) (1ull << (n))
     typedef big_nat small_set;

     nat sqrt_n = isqrt(n);
     void *pset = bitset(n);

     static small_set s1 =
          B(1) | B(13) | B(17) | B(29) | B(37) | B(41) | B(49) | B(53);
     for (big_nat x = 1; x <= sqrt_n; x++) {
          for (nat y = 1; y <= sqrt_n; y += 2) {
               big_nat m = 4*x*x + y*y;
               if ((B(m % 60) & s1) && m <= n)
                    bitset_flip(pset, m);
          }
     }

     static small_set s2 = B(7) | B(19) | B(31) | B(43);
     for (big_nat x = 1; x <= sqrt_n; x += 2) {
          for (nat y = 2; y <= sqrt_n; y += 2) {
               big_nat m = 3*x*x + y*y;
               if ((B(m % 60) & s2) && m <= n)
                    bitset_flip(pset, m);
          }
     }

     static small_set s3 = B(11) | B(23) | B(47) | B(59);
     for (big_nat x = 2; x <= sqrt_n; x++) {
          for (int y = x - 1; y >= 1; y -= 2) {
               big_nat m = 3*x*x - y*y;
               if ((B(m % 60) & s3) && m <= n)
                    bitset_flip(pset, m);
          }
     }

     static small_set s =
           B(1) |  B(7) | B(11) | B(13) | B(17) | B(19) | B(23) | B(29) |
          B(31) | B(37) | B(41) | B(43) | B(47) | B(49) | B(53) | B(59);
     for (big_nat m = 2; m <= n; m++) {
          if (!(B(m % 60) & s))
               continue;
          big_nat mm = m*m;
          if (mm > n)
               break;
          if (bitset_test(pset, m)) {
               for (big_nat m2 = 1; m2 <= n; m2++) {
                    if (!(B(m2 % 60) & s))
                         continue;
                    big_nat c = mm * m2;
                    if (c > n)
                         break;
                    bitset_clear(pset, c);
               }
          }
     }
     bitset_flip(pset, 2);
     bitset_flip(pset, 3);
     bitset_flip(pset, 5);
     return pset;
}

int main(int argc, char **argv)
{
     int p = argc > 1 ? atoi(argv[1]) : 32;
     nat n = (nat)-1 >> 32 - p;
     fprintf(stderr, "p=%d, n=%u\n", p, n);

     void *pset = primes_up_to(n);
     nat count = 0;
     while (n > 0)
          if (bitset_test(pset, n--))
               count += 1;
     printf("%u\n", count);
     free(pset);
}

I wanted to get rid of the big_nat type.  I's sure it can be written
using only 32-bit types.

> Also do
> you have a reference for the Atkin/Bernstein algorithm (or even
> better, code?)?

Well, there's this: https://en.wikipedia.org/wiki/Sieve_of_Atkin

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#91475

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2023-08-30 17:45 -0700
Message-ID<86v8cwt4yd.fsf@linuxsc.com>
In reply to#91464
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>
>>> I wanted to try a newer algorithm, so I coded up a rather naive
>>> version of Atkin & Bernstein's sieve in C.  It needs some tidying
>>> and I imagine a bit can be shaved off the time.
>>
>> Thank you for this.  Would you mind posting your code?
>
> Hmm...  It's a bit of a mess... but sure.  [...]

It looks quite okay.  I haven't yet had time to look at it
closely but I look forward to doing so.

>> Also do
>> you have a reference for the Atkin/Bernstein algorithm (or even
>> better, code?)?
>
> Well, there's this:  https://en.wikipedia.org/wiki/Sieve_of_Atkin

Excellent!  And this page has a link to DJ Bernstein's fast
primes code, which is stunningly swift.

Thank you for both.

[toc] | [prev] | [next] | [standalone]


#91476

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-08-31 03:18 +0100
Message-ID<87wmxckl8x.fsf@bsb.me.uk>
In reply to#91475
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>
>>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>>
>>>> I wanted to try a newer algorithm, so I coded up a rather naive
>>>> version of Atkin & Bernstein's sieve in C.  It needs some tidying
>>>> and I imagine a bit can be shaved off the time.
>>>
>>> Thank you for this.  Would you mind posting your code?
>>
>> Hmm...  It's a bit of a mess... but sure.  [...]
>
> It looks quite okay.  I haven't yet had time to look at it
> closely but I look forward to doing so.

About 20% of the time was spent counting the primes, so I added a
population count function to the bitset operations.  And there's an
obvious halving one can do on the upper bound of the first loop.  That
brought the time down to about 28 seconds.

>>> Also do
>>> you have a reference for the Atkin/Bernstein algorithm (or even
>>> better, code?)?
>>
>> Well, there's this:  https://en.wikipedia.org/wiki/Sieve_of_Atkin
>
> Excellent!  And this page has a link to DJ Bernstein's fast
> primes code, which is stunningly swift.

I haven't looked at it yet.  It would probably have put me off!

> Thank you for both.

You're welcome.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#91462

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2023-08-28 15:08 -0700
Message-ID<865y4yyg3p.fsf@linuxsc.com>
In reply to#91450
Tiib <ootiib@hot.ee> writes:

> On Thursday, 17 August 2023 at 05:26:37 UTC+3, Tim Rentsch wrote:
>
>> I suggest computing all 32 bit primes for the benchmark
>> tests.  Shouldn't take too long.
>
> Took 14 minutes to find those 203280221 primes single threaded
> on i7-8550U.

I'm pleased to see that my suggestions sparked some interest.

[toc] | [prev] | [next] | [standalone]


#91284

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-08-17 08:42 +0200
Message-ID<ubkfhd$3mcbv$1@dont-email.me>
In reply to#91280
Am 17.08.2023 um 03:06 schrieb red floyd:

> Here's mine.  I get rid of the vector<bool> by storing the prime factors
> in their own vector, and only checking for divisibility by primes.

If I modify my code to use the same, called Euler's sieve, my code
becomes 19 times slower on my 7950X with an upper bound of 1E6.

[toc] | [prev] | [next] | [standalone]


Page 3 of 8 — ← Prev page 1 2 [3] 4 5 6 7 8  Next page →

Back to top | Article view | comp.lang.c++


csiph-web