Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"I am, therefore I am." -- Akira


devel / comp.lang.c++ / Re: Sieve of Erastosthenes optimized to the max

SubjectAuthor
* Sieve of Erastosthenes optimized to the maxBonita Montero
+* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|`* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
| `* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|  +* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|  |`* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|  | +* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|  | |`- Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|  | `* Re: Sieve of Erastosthenes optimized to the maxred floyd
|  |  `* Re: Sieve of Erastosthenes optimized to the maxTim Rentsch
|  |   `* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|  |    `* Re: Sieve of Erastosthenes optimized to the maxTim Rentsch
|  |     `* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|  |      `- Re: Sieve of Erastosthenes optimized to the maxTim Rentsch
|  `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|   `* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|    +- Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|    +- Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|    `* Re: Sieve of Erastosthenes optimized to the maxTim Rentsch
|     `* Re: Sieve of Erastosthenes optimized to the maxVir Campestris
|      `- Re: Sieve of Erastosthenes optimized to the maxTim Rentsch
+* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|`* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
| `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|  `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|   `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|    `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|     `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|      `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|       `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|        `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|         `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          +* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |`* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          | `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |  `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |   `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |    `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |     `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |      `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       +* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |`* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | +* Re: Sieve of Erastosthenes optimized to the maxDavid Brown
|          |       | |`* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | | `* Re: Sieve of Erastosthenes optimized to the maxDavid Brown
|          |       | |  +- Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  `* Re: Sieve of Erastosthenes optimized to the maxScott Lurndal
|          |       | |   `- Re: Sieve of Erastosthenes optimized to the maxDavid Brown
|          |       | +* Re: Sieve of Erastosthenes optimized to the maxScott Lurndal
|          |       | |+* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | ||`- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       | |`* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       | | `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       | |  +* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |+- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       | |  |`* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |  | `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |  +* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |  |  |`* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |  | `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |  |  |  `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |  |   `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |  |  |    `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |  |     `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |  |  |      `- Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |  `* Re: Sieve of Erastosthenes optimized to the maxScott Lurndal
|          |       | |  |   `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |    `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |  |     `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       | |  |      `- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       | |  `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       | |   `- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       | `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       |  `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |   `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |    +* Re: Sieve of Erastosthenes optimized to the maxred floyd
|          |       |    |`- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |    `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     +* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |`* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     | `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |  `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |   `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |    `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |     `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |      `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |       `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |        `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |         `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |          `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |           `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       |     |            `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |             `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |              +* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |              |`- Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |              `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |               `* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |                `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |                 +* Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |                 |`* Re: Sieve of Erastosthenes optimized to the maxred floyd
|          |       |     |                 | +- Re: Sieve of Erastosthenes optimized to the maxBonita Montero
|          |       |     |                 | `- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       |     |                 `* Re: Sieve of Erastosthenes optimized to the maxKaz Kylheku
|          |       |     `- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          |       `- Re: Sieve of Erastosthenes optimized to the maxChris M. Thomasson
|          `* Re: Sieve of Erastosthenes optimized to the maxBonita Montero
`* Re: Sieve of Erastosthenes optimized to the maxwij

Pages:123456
Re: Sieve of Erastosthenes optimized to the max

<umng8b$ve1t$5@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Fri, 29 Dec 2023 14:12:26 -0800
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <umng8b$ve1t$5@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Dec 2023 22:12:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3b9c8277d0ce293bbef9695132362a05";
logging-data="1030205"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sjN+9w1l37TaNnUNPKh6qY2gUWG95mUs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2QCELucJX5Sv3H2rtT5NskMfkkM=
In-Reply-To: <umng1u$ve1t$4@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Fri, 29 Dec 2023 22:12 UTC

On 12/29/2023 2:09 PM, Chris M. Thomasson wrote:
> On 12/29/2023 8:01 AM, Scott Lurndal wrote:
>> page 2-35 in the_Intel Pentium 4 Processor Optimization_
>> manual.
>
> I think it was in chapter 5 of Developing Multithreaded Applications: A
> Platform Consistent Approach cannot remember the damn section right now.

Wait a minute! I might have found it, lets see:

https://www.intel.com/content/dam/www/public/us/en/documents/training/developing-multithreaded-applications.pdf

Ahhh section 5.3! Nice! I read this a while back, before 2005.

Thanks for sparking my memory Scott.

Re: Sieve of Erastosthenes optimized to the max

<umo74a$165i5$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 05:42:50 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <umo74a$165i5$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 04:42:50 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="14e596b13882268842c6cb984254d1e2";
logging-data="1250885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XkQ2MkHEUDt+BuN3jYmm1ZV5vCFv1jlo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SKNGyW/hcAaIz2bTWutOgjg7Ht8=
Content-Language: de-DE
In-Reply-To: <umng8b$ve1t$5@dont-email.me>
 by: Bonita Montero - Sat, 30 Dec 2023 04:42 UTC

Am 29.12.2023 um 23:12 schrieb Chris M. Thomasson:

> Wait a minute! I might have found it, lets see:
> https://www.intel.com/content/dam/www/public/us/en/documents/training/developing-multithreaded-applications.pdf
> Ahhh section 5.3! Nice! I read this a while back, before 2005.

This is nonsense what it says if the cache is really four-way
associative like in the other paper mentioned here. And of
course that has nothing to do with false sharing

Re: Sieve of Erastosthenes optimized to the max

<umo79f$166v3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Fri, 29 Dec 2023 20:45:35 -0800
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <umo79f$166v3$1@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 04:45:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0d2513ce0c0053f4a1deee7f67453611";
logging-data="1252323"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187+eINuSU/2TMLoavu3rOnfi/AEcwhl8U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:iTI/pXtStsY18tzn9KqB7UIEuiI=
In-Reply-To: <umo74a$165i5$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 30 Dec 2023 04:45 UTC

On 12/29/2023 8:42 PM, Bonita Montero wrote:
> Am 29.12.2023 um 23:12 schrieb Chris M. Thomasson:
>
>> Wait a minute! I might have found it, lets see:
>> https://www.intel.com/content/dam/www/public/us/en/documents/training/developing-multithreaded-applications.pdf
>> Ahhh section 5.3! Nice! I read this a while back, before 2005.
>
> This is nonsense what it says if the cache is really four-way
> associative like in the other paper mentioned here. And of
> course that has nothing to do with false sharing

You should write Intel a letter. ;^o

Re: Sieve of Erastosthenes optimized to the max

<umo79t$165i5$2@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 05:45:50 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <umo79t$165i5$2@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um2dsb$17vgg$2@dont-email.me>
<um2vpr$1e7pn$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 04:45:50 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="14e596b13882268842c6cb984254d1e2";
logging-data="1250885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nwrGt/E92HjYmAaLOmAYRPvXxv0jZH0k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:FiuojsdeEn1u8tAnPMpmE5wv810=
Content-Language: de-DE
In-Reply-To: <20231229092738.13@kylheku.com>
 by: Bonita Montero - Sat, 30 Dec 2023 04:45 UTC

Am 29.12.2023 um 18:29 schrieb Kaz Kylheku:

> I explained it. The allocation is not used. When you call alloca(n),
> the stack pointer moves by n bytes. If you then call a function,
> its stack frame will be offset by that much (plus any alignment if
> n is not aligned).

According to the paper Scott mentioned the associativity of the
Pentium 4's L1 data cache is four. With that it's not necessary
to have such aliasing preventions.

Re: Sieve of Erastosthenes optimized to the max

<20231229204922.649@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 04:51:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20231229204922.649@kylheku.com>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
Injection-Date: Sat, 30 Dec 2023 04:51:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ea78fa1db4e4edc41ebe1f0fa3e22fae";
logging-data="1252747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FqmhXEFLQPqkc8ga4EGkD0iSyJm+g/Fk="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:VulK0xFQIMpoFi/+LLAhwpUxZII=
 by: Kaz Kylheku - Sat, 30 Dec 2023 04:51 UTC

On 2023-12-29, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
> On 12/29/2023 2:09 PM, Chris M. Thomasson wrote:
>> On 12/29/2023 8:01 AM, Scott Lurndal wrote:
>>> page 2-35 in the_Intel Pentium 4 Processor Optimization_
>>> manual.
>>
>> I think it was in chapter 5 of Developing Multithreaded Applications: A
>> Platform Consistent Approach cannot remember the damn section right now.
>
> Wait a minute! I might have found it, lets see:
>
> https://www.intel.com/content/dam/www/public/us/en/documents/training/developing-multithreaded-applications.pdf
>
> Ahhh section 5.3! Nice! I read this a while back, before 2005.

Wow, I guessed that one. Elsewhere in the thread, I made a remark
similar to "imagine that thread stacks are aligned at an address like
nnnnFFFF" I.e. the top of the stack starts at the top of a 64 kB
aligned window. I was exactly thinking of a typical L1 cache size
from aroudn that era, in fact.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Sieve of Erastosthenes optimized to the max

<20231229205321.72@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 04:56:19 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <20231229205321.72@kylheku.com>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
Injection-Date: Sat, 30 Dec 2023 04:56:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ea78fa1db4e4edc41ebe1f0fa3e22fae";
logging-data="1252747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RhTzm4/C3FLje7mtPaP+GofbSCPmq3P0="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:Zmg/vPl6eeo6zJSsp5pksWJa+pw=
 by: Kaz Kylheku - Sat, 30 Dec 2023 04:56 UTC

On 2023-12-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 29.12.2023 um 23:12 schrieb Chris M. Thomasson:
>
>> Wait a minute! I might have found it, lets see:
>> https://www.intel.com/content/dam/www/public/us/en/documents/training/developing-multithreaded-applications.pdf
>> Ahhh section 5.3! Nice! I read this a while back, before 2005.
>
> This is nonsense what it says if the cache is really four-way
> associative like in the other paper mentioned here. And of
> course that has nothing to do with false sharing

If it's four way associative, you star to have a performance problem as
soon as five things collide on it. For instance, suppose you have two
thread stack tops mapped to the same cache lines, plus three more data
structures heavily being accessed.

Oh, and the above Intel paper does actually mention alloca:

"The easiest way to adjust the initial stack address for each thread is
to call the memory allocation function, _alloca, with varying byte
amounts in the intermediate thread function."

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Sieve of Erastosthenes optimized to the max

<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 06:09:55 +0100
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 05:09:56 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="14e596b13882268842c6cb984254d1e2";
logging-data="1257263"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19dIzzeugHN8CDrIVbRyglCpuBXequ1+WY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tgQk1u6/MInHOtWhYbFZjCqM8M8=
In-Reply-To: <20231229205321.72@kylheku.com>
Content-Language: de-DE
 by: Bonita Montero - Sat, 30 Dec 2023 05:09 UTC

Am 30.12.2023 um 05:56 schrieb Kaz Kylheku:

> If it's four way associative, you star to have a performance problem as
> soon as five things collide on it. ...

With four-way associativity that's rather unlikely.

Re: Sieve of Erastosthenes optimized to the max

<20231229214914.605@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 05:51:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <20231229214914.605@kylheku.com>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
Injection-Date: Sat, 30 Dec 2023 05:51:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ea78fa1db4e4edc41ebe1f0fa3e22fae";
logging-data="1264203"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19D+WNEMzFh040jJGB9mQVW9IgFxVaLvqk="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:JldS1inwoiG72OYjSi5P16Oepm4=
 by: Kaz Kylheku - Sat, 30 Dec 2023 05:51 UTC

On 2023-12-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 30.12.2023 um 05:56 schrieb Kaz Kylheku:
>
>> If it's four way associative, you star to have a performance problem as
>> soon as five things collide on it. ...
>
> With four-way associativity that's rather unlikely.

Under four-way associativity, five isn't greater than four?

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Sieve of Erastosthenes optimized to the max

<umon3l$17r5j$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 10:15:34 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <umon3l$17r5j$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
<20231229214914.605@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 09:15:33 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="14e596b13882268842c6cb984254d1e2";
logging-data="1305779"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h98ros/EPPuw7XS/1SGDjlydMjw1GFrM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:oP0qN5ths+jS+MKYyg/QQMKu9dk=
In-Reply-To: <20231229214914.605@kylheku.com>
Content-Language: de-DE
 by: Bonita Montero - Sat, 30 Dec 2023 09:15 UTC

Am 30.12.2023 um 06:51 schrieb Kaz Kylheku:

> Under four-way associativity, five isn't greater than four?

Two-way associativeness would leave no space if both threads have
synchronous stack frames. With four-way associativeness there's
not much likehood for that to happen.

Re: Sieve of Erastosthenes optimized to the max

<umpnei$1c0qj$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 19:27:30 +0100
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <umpnei$1c0qj$1@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um2dsb$17vgg$2@dont-email.me>
<um2vpr$1e7pn$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<ummfmm$r4ol$1@dont-email.me>
<ummqmc$slfn$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 30 Dec 2023 18:27:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0d4c4b002ec31ec783018cbb260b1149";
logging-data="1442643"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UPThJO1oAaxXkpgD+VYYDykQbHm27FnE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KD+1oDlDrqBhkeUtqf3vzunRPcs=
Content-Language: en-GB
In-Reply-To: <ummqmc$slfn$1@raubtier-asyl.eternal-september.org>
 by: David Brown - Sat, 30 Dec 2023 18:27 UTC

On 29/12/2023 17:04, Bonita Montero wrote:
> Am 29.12.2023 um 13:56 schrieb David Brown:
>
>> There is nothing different from alloca() and ordinary stack
>> allocations.  But alloca() makes it quick and easy to make large
>> allocations, and to do so with random sizes (or at least sizes that
>> differ significantly between threads, even if they are running the
>> same code).
>
> I've got my own class overflow_array<> which is like an array<> and a
> vector<>. If you append more than the internal array<> can handle the
> objects are moved to an internal vector. I think Boost's small_array
> is similar to that.

I'm sure that's all very nice, but it is completely and utterly
irrelevant to the issue being discussed. Perhaps you didn't understand
your own post?

>
>> Without  alloca(), you'd need to do something like arranging to call a
>> recursive  function a random number of times before it then calls the
>> next bit of  code in your thread.  alloca() is simply far easier and
>> faster.
>
> You've got strange ideas. alloca() has been completely removed from the
> Linux kernel.

Citation? You are usually wrong in your claims, or at least mixed-up,
so I won't trust you without evidence. (That does not mean you are
wrong here - I don't know either way.)

Of course, avoiding alloca() within the kernel is, again, utterly
irrelevant to the point under discussion.

> The point is that if there's a fixed upper limit you would
> allocate you could allocate it always statically.
>

No, that would be useless.

The idea is to have /different/ allocation sizes in different threads,
so that the different threads have their stacks at wildly different
address bits in their tags for the processor caches.

I can't tell you how helpful or not this may be in practice. I am
merely trying to explain to you what the idea is, since you said you did
not understand it.

Re: Sieve of Erastosthenes optimized to the max

<umpspm$1cphn$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 11:58:45 -0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <umpspm$1cphn$1@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um2dsb$17vgg$2@dont-email.me>
<um2vpr$1e7pn$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
<umo79t$165i5$2@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 19:58:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0d2513ce0c0053f4a1deee7f67453611";
logging-data="1467959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OTXoHJ2sDNeMkF7dnfgpR7REfSsS6BuM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JTtdKwHp+/3ngp1ShQXbpbNhPlc=
Content-Language: en-US
In-Reply-To: <umo79t$165i5$2@raubtier-asyl.eternal-september.org>
 by: Chris M. Thomasson - Sat, 30 Dec 2023 19:58 UTC

On 12/29/2023 8:45 PM, Bonita Montero wrote:
> Am 29.12.2023 um 18:29 schrieb Kaz Kylheku:
>
>> I explained it. The allocation is not used. When you call alloca(n),
>> the stack pointer moves by n bytes. If you then call a function,
>> its stack frame will be offset by that much (plus any alignment if
>> n is not aligned).
>
> According to the paper Scott mentioned the associativity of the
> Pentium 4's L1 data cache is four. With that it's not necessary
> to have such aliasing preventions.
>

Huh? Wow, you really need to write Intel a letter about it wrt their
older hyperthreaded processors! Although, it seems like you simply do
not actually _understand_ what is going on here...

Intel's suggestions for how to mitigate the problem in their earlier
hyperhtreaded processors actually worked wrt improving performance. Keep
in mind this was a while back in 2004-2005. I am happy that the way back
machine has my older code.

Re: Sieve of Erastosthenes optimized to the max

<umpss1$1cphn$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 12:00:00 -0800
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <umpss1$1cphn$2@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me> <20231229204922.649@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 20:00:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0d2513ce0c0053f4a1deee7f67453611";
logging-data="1467959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HemtognGrTrUVW2mnHMDeadhrDfUpkEk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Gl/1n9c61yV0vZSWVyhaSM/KKUg=
Content-Language: en-US
In-Reply-To: <20231229204922.649@kylheku.com>
 by: Chris M. Thomasson - Sat, 30 Dec 2023 20:00 UTC

On 12/29/2023 8:51 PM, Kaz Kylheku wrote:
> On 2023-12-29, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
>> On 12/29/2023 2:09 PM, Chris M. Thomasson wrote:
>>> On 12/29/2023 8:01 AM, Scott Lurndal wrote:
>>>> page 2-35 in the_Intel Pentium 4 Processor Optimization_
>>>> manual.
>>>
>>> I think it was in chapter 5 of Developing Multithreaded Applications: A
>>> Platform Consistent Approach cannot remember the damn section right now.
>>
>> Wait a minute! I might have found it, lets see:
>>
>> https://www.intel.com/content/dam/www/public/us/en/documents/training/developing-multithreaded-applications.pdf
>>
>> Ahhh section 5.3! Nice! I read this a while back, before 2005.
>
> Wow, I guessed that one. Elsewhere in the thread, I made a remark
> similar to "imagine that thread stacks are aligned at an address like
> nnnnFFFF" I.e. the top of the stack starts at the top of a 64 kB
> aligned window. I was exactly thinking of a typical L1 cache size
> from aroudn that era, in fact.
>

Yup! You pretty much got it. Thanks Kaz )

Re: Sieve of Erastosthenes optimized to the max

<20231230123312.311@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 20:35:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <20231230123312.311@kylheku.com>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
<20231229214914.605@kylheku.com>
<umon3l$17r5j$1@raubtier-asyl.eternal-september.org>
Injection-Date: Sat, 30 Dec 2023 20:35:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ea78fa1db4e4edc41ebe1f0fa3e22fae";
logging-data="1478809"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hS/9FtO7R97p9Zjt1A5FWtsjFYgTYbl0="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:r4HIkrwsq5pgNU052efRb29Y6P4=
 by: Kaz Kylheku - Sat, 30 Dec 2023 20:35 UTC

On 2023-12-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 30.12.2023 um 06:51 schrieb Kaz Kylheku:
>
>> Under four-way associativity, five isn't greater than four?
>
> Two-way associativeness would leave no space if both threads have
> synchronous stack frames. With four-way associativeness there's
> not much likehood for that to happen.

My comment makes it clear that there are two thread stacks vying
for that cache line, plus a couple of other accesses that
are not thread stacks.

(By the way, set associative caches don't always have full LRU
replacement strategies.)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Sieve of Erastosthenes optimized to the max

<umq79v$1e6fb$1@redfloyd.dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam....@its.invalid (red floyd)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sat, 30 Dec 2023 14:58:06 -0800
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <umq79v$1e6fb$1@redfloyd.dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um2vpr$1e7pn$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
<umo79t$165i5$2@raubtier-asyl.eternal-september.org>
<umpspm$1cphn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Dec 2023 22:58:07 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="5838b119d09b35135cff444cb98bc4fd";
logging-data="1513963"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/c73kg4pVwN/N+6bJ0RtD8UMZ/Ykr1lRE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ixoa08r9pfblxudzDWbAwpfQyTE=
In-Reply-To: <umpspm$1cphn$1@dont-email.me>
Content-Language: en-US
 by: red floyd - Sat, 30 Dec 2023 22:58 UTC

On 12/30/2023 11:58 AM, Chris M. Thomasson wrote:
> On 12/29/2023 8:45 PM, Bonita Montero wrote:
>> Am 29.12.2023 um 18:29 schrieb Kaz Kylheku:
>>
>>> I explained it. The allocation is not used. When you call alloca(n),
>>> the stack pointer moves by n bytes. If you then call a function,
>>> its stack frame will be offset by that much (plus any alignment if
>>> n is not aligned).
>>
>> According to the paper Scott mentioned the associativity of the
>> Pentium 4's L1 data cache is four. With that it's not necessary
>> to have such aliasing preventions.
>>
>
> Huh? Wow, you really need to write Intel a letter about it wrt their
> older hyperthreaded processors! Although, it seems like you simply do
> not actually _understand_ what is going on here...
>
> Intel's suggestions for how to mitigate the problem in their earlier
> hyperhtreaded processors actually worked wrt improving performance. Keep
> in mind this was a while back in 2004-2005. I am happy that the way back
> machine has my older code.

Oh, come on, Chris. It's clear that Bonita knows more about what's
going on inside an Intel processor than Intel does.

Re: Sieve of Erastosthenes optimized to the max

<umqvhh$1kvj6$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 06:51:45 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <umqvhh$1kvj6$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um2vpr$1e7pn$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
<umo79t$165i5$2@raubtier-asyl.eternal-september.org>
<umpspm$1cphn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 31 Dec 2023 05:51:45 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="86d19880f10ea8f8534437121554b32a";
logging-data="1736294"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BeQjSh0VgpDf/g8p5a0IYmy8xG5wxC0k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:uR4OYDXMMkBBb12Vxl2R35L+k1o=
In-Reply-To: <umpspm$1cphn$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Sun, 31 Dec 2023 05:51 UTC

Am 30.12.2023 um 20:58 schrieb Chris M. Thomasson:

> Huh? Wow, you really need to write Intel a letter about it wrt their
> older hyperthreaded processors! ...

The suggestion Intel made at this point is superfluous.

> Intel's suggestions for how to mitigate the problem in their earlier
> hyperhtreaded processors actually worked wrt improving performance. ...

I'm pretty sure they never ran the numbers on that.

Re: Sieve of Erastosthenes optimized to the max

<umqvn3$1l04c$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 06:54:44 +0100
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <umqvn3$1l04c$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
<20231229214914.605@kylheku.com>
<umon3l$17r5j$1@raubtier-asyl.eternal-september.org>
<20231230123312.311@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 31 Dec 2023 05:54:43 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="86d19880f10ea8f8534437121554b32a";
logging-data="1736844"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Q0z3E7vgNJwk+Wck06VFvD/cgKnujDAc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Sn/eYEzlDLpq6GxudOo7l8aO8uY=
Content-Language: de-DE
In-Reply-To: <20231230123312.311@kylheku.com>
 by: Bonita Montero - Sun, 31 Dec 2023 05:54 UTC

Am 30.12.2023 um 21:35 schrieb Kaz Kylheku:

> My comment makes it clear that there are two thread stacks
> vying for that cache line, plus a couple of other accesses
> that are not thread stacks.

With four way associativity that's rather unlikely to happen.

Re: Sieve of Erastosthenes optimized to the max

<20231230224218.778@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 07:01:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <20231230224218.778@kylheku.com>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
<20231229214914.605@kylheku.com>
<umon3l$17r5j$1@raubtier-asyl.eternal-september.org>
<20231230123312.311@kylheku.com>
<umqvn3$1l04c$1@raubtier-asyl.eternal-september.org>
Injection-Date: Sun, 31 Dec 2023 07:01:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dc5f0f430fe1b4bd6cdf246437f21a94";
logging-data="1748624"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vyfwbbWctM5zaQGRNXlWm/sSme116jRk="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:CvosC2VIBRV2DfjkOUQWhR4xoHg=
 by: Kaz Kylheku - Sun, 31 Dec 2023 07:01 UTC

On 2023-12-31, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 30.12.2023 um 21:35 schrieb Kaz Kylheku:
>
>> My comment makes it clear that there are two thread stacks
>> vying for that cache line, plus a couple of other accesses
>> that are not thread stacks.
>
> With four way associativity that's rather unlikely to happen.

What? The associativity of the cache is not the determiner of
program behavior; if the program accesses five different
areas whose addresses are the same modulo 65536 bytes,
that happens whether there a direct mapped cache, fully
associative cache or no cache at all, or ...

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Sieve of Erastosthenes optimized to the max

<umrfa0$1mnj7$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 11:20:50 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <umrfa0$1mnj7$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
<20231229214914.605@kylheku.com>
<umon3l$17r5j$1@raubtier-asyl.eternal-september.org>
<20231230123312.311@kylheku.com>
<umqvn3$1l04c$1@raubtier-asyl.eternal-september.org>
<20231230224218.778@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 31 Dec 2023 10:20:48 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="86d19880f10ea8f8534437121554b32a";
logging-data="1793639"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ben2mMXISkLWfhICBbmqH57PYOLXIwBs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Vdfo7VOtAGJSoZFrpH302Der7lk=
Content-Language: de-DE
In-Reply-To: <20231230224218.778@kylheku.com>
 by: Bonita Montero - Sun, 31 Dec 2023 10:20 UTC

Am 31.12.2023 um 08:01 schrieb Kaz Kylheku:
> On 2023-12-31, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 30.12.2023 um 21:35 schrieb Kaz Kylheku:
>>
>>> My comment makes it clear that there are two thread stacks
>>> vying for that cache line, plus a couple of other accesses
>>> that are not thread stacks.
>>
>> With four way associativity that's rather unlikely to happen.
>
> What? The associativity of the cache is not the determiner
> of program behavior; if the program accesses five different
> areas whose addresses are the same modulo 65536 bytes, ...

The set size is smaller than 64kB an of course there can be aliasing
but with four way associativity it's unlikely that there's a need to
control aliasing. And if the set size would be 64kB aliasing would be
even less likely through page colouring.

> that happens whether there a direct mapped cache, fully
> associative cache or no cache at all, or ...
>
>
>
>

Re: Sieve of Erastosthenes optimized to the max

<umrfct$1mnj7$2@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 11:22:23 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <umrfct$1mnj7$2@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um2vpr$1e7pn$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<ummfmm$r4ol$1@dont-email.me>
<ummqmc$slfn$1@raubtier-asyl.eternal-september.org>
<umpnei$1c0qj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 31 Dec 2023 10:22:21 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="86d19880f10ea8f8534437121554b32a";
logging-data="1793639"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CbHjQLOKiNFml2JL3lWJaPlxTklVWw5c="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0Gj8rJzZl5E2aqH6WHb/7Q+38Uc=
Content-Language: de-DE
In-Reply-To: <umpnei$1c0qj$1@dont-email.me>
 by: Bonita Montero - Sun, 31 Dec 2023 10:22 UTC

Am 30.12.2023 um 19:27 schrieb David Brown:

> The idea is to have /different/ allocation sizes in different threads,
> so that the different threads have their stacks at wildly different
> address bits in their tags for the processor caches.

There's not much need to do that with four-way associativity.

> I can't tell you how helpful or not this may be in practice. ...

Even Intel cant't do that.

Re: Sieve of Erastosthenes optimized to the max

<20231231092719.784@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 17:30:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <20231231092719.784@kylheku.com>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me>
<umng8b$ve1t$5@dont-email.me>
<umo74a$165i5$1@raubtier-asyl.eternal-september.org>
<20231229205321.72@kylheku.com>
<umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
<20231229214914.605@kylheku.com>
<umon3l$17r5j$1@raubtier-asyl.eternal-september.org>
<20231230123312.311@kylheku.com>
<umqvn3$1l04c$1@raubtier-asyl.eternal-september.org>
<20231230224218.778@kylheku.com>
<umrfa0$1mnj7$1@raubtier-asyl.eternal-september.org>
Injection-Date: Sun, 31 Dec 2023 17:30:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dc5f0f430fe1b4bd6cdf246437f21a94";
logging-data="1897829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199hTUWvtAQwBGurQ9WW3OLlnUD+IRD9LY="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:rzQiONTT/5yeDwj00CR9NjvfPJw=
 by: Kaz Kylheku - Sun, 31 Dec 2023 17:30 UTC

On 2023-12-31, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 31.12.2023 um 08:01 schrieb Kaz Kylheku:
>> On 2023-12-31, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> Am 30.12.2023 um 21:35 schrieb Kaz Kylheku:
>>>
>>>> My comment makes it clear that there are two thread stacks
>>>> vying for that cache line, plus a couple of other accesses
>>>> that are not thread stacks.
>>>
>>> With four way associativity that's rather unlikely to happen.
>>
>> What? The associativity of the cache is not the determiner
>> of program behavior; if the program accesses five different
>> areas whose addresses are the same modulo 65536 bytes, ...
>
> The set size is smaller than 64kB an of course there can be aliasing
> but with four way associativity it's unlikely that there's a need to
> control aliasing. And if the set size would be 64kB aliasing would be
> even less likely through page colouring.

When I describe a scenario in which five items are being frequently
accessed and collide to the same cache line, which is associative with a
set size of four, there is necessarily a conflict, because five is
greater than four.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Sieve of Erastosthenes optimized to the max

<GEikN.127080$83n7.18826@fx18.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.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 Erastosthenes optimized to the max
Newsgroups: comp.lang.c++
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org> <uml0sp$i3j7$1@dont-email.me> <umldni$n9ob$1@raubtier-asyl.eternal-september.org> <umljmb$nrkt$1@dont-email.me> <umm582$pqb4$1@raubtier-asyl.eternal-september.org> <L3CjN.109558$p%Mb.3353@fx15.iad> <umng1u$ve1t$4@dont-email.me> <umng8b$ve1t$5@dont-email.me> <umo74a$165i5$1@raubtier-asyl.eternal-september.org> <20231229205321.72@kylheku.com> <umo8n3$16bpf$1@raubtier-asyl.eternal-september.org>
Lines: 15
Message-ID: <GEikN.127080$83n7.18826@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 31 Dec 2023 18:44:54 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 31 Dec 2023 18:44:54 GMT
X-Received-Bytes: 1589
 by: Scott Lurndal - Sun, 31 Dec 2023 18:44 UTC

Bonita Montero <Bonita.Montero@gmail.com> writes:
>Am 30.12.2023 um 05:56 schrieb Kaz Kylheku:
>
>> If it's four way associative, you star to have a performance problem as
>> soon as five things collide on it. ...
>
>With four-way associativity that's rather unlikely.
>

Why? The set selection is based on specific bits in the address. As soon
as a fifth address hits the set, you lose one of the existing lines.

Given the aligned stacks in the specified processor, the next function
called would _always_ overwrite the elements of the set(s) used by the calling function.

Re: Sieve of Erastosthenes optimized to the max

<SIikN.127081$83n7.67410@fx18.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.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 Erastosthenes optimized to the max
Newsgroups: comp.lang.c++
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org> <umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org> <20231227124453.126@kylheku.com> <umjkg8$bqmr$1@raubtier-asyl.eternal-september.org> <uml0sp$i3j7$1@dont-email.me> <umldni$n9ob$1@raubtier-asyl.eternal-september.org> <umljmb$nrkt$1@dont-email.me> <umm582$pqb4$1@raubtier-asyl.eternal-september.org> <ummfmm$r4ol$1@dont-email.me> <ummqmc$slfn$1@raubtier-asyl.eternal-september.org> <umpnei$1c0qj$1@dont-email.me>
Lines: 21
Message-ID: <SIikN.127081$83n7.67410@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 31 Dec 2023 18:49:22 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 31 Dec 2023 18:49:22 GMT
X-Received-Bytes: 1736
 by: Scott Lurndal - Sun, 31 Dec 2023 18:49 UTC

David Brown <david.brown@hesbynett.no> writes:
>On 29/12/2023 17:04, Bonita Montero wrote:

>>
>> You've got strange ideas. alloca() has been completely removed from the
>> Linux kernel.
>
>Citation? You are usually wrong in your claims, or at least mixed-up,
>so I won't trust you without evidence. (That does not mean you are
>wrong here - I don't know either way.)

Kernel threads generally run with a small, fixed stack. Stack-based
dynamic allocation is generally avoided. I don't know of any
hard restrictions, but I suspect that Linus would look askance
at it.

>
>Of course, avoiding alloca() within the kernel is, again, utterly
>irrelevant to the point under discussion.

Very true

Re: Sieve of Erastosthenes optimized to the max

<umsfrt$1qvlo$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 11:36:29 -0800
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <umsfrt$1qvlo$1@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
<umo79t$165i5$2@raubtier-asyl.eternal-september.org>
<umpspm$1cphn$1@dont-email.me>
<umqvhh$1kvj6$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 31 Dec 2023 19:36:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b3a45f802fb88652a535eaac0edd3bc6";
logging-data="1932984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nB6BOMiQ/hPt38rw65UGkdYigsDtTWxk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Pq4OtpyXFnrxfIepL4fKhdft+lA=
In-Reply-To: <umqvhh$1kvj6$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 31 Dec 2023 19:36 UTC

On 12/30/2023 9:51 PM, Bonita Montero wrote:
> Am 30.12.2023 um 20:58 schrieb Chris M. Thomasson:
>
>> Huh? Wow, you really need to write Intel a letter about it wrt their
>> older hyperthreaded processors! ...
>
> The suggestion Intel made at this point is superfluous.
>
>> Intel's suggestions for how to mitigate the problem in their earlier
>> hyperhtreaded processors actually worked wrt improving performance. ...
>
> I'm pretty sure they never ran the numbers on that.
>
>

I am pretty sure you are trolling, Bonita?

Re: Sieve of Erastosthenes optimized to the max

<umsg0t$1r16p$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 11:39:09 -0800
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <umsg0t$1r16p$1@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
<umo79t$165i5$2@raubtier-asyl.eternal-september.org>
<umpspm$1cphn$1@dont-email.me>
<umqvhh$1kvj6$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 31 Dec 2023 19:39:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b3a45f802fb88652a535eaac0edd3bc6";
logging-data="1934553"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nVS7U/qQxl5V8fZNd030N8TKRma2TSA8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0Ko4vs52/dYQ4DaUi0WBXbPLJPs=
In-Reply-To: <umqvhh$1kvj6$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 31 Dec 2023 19:39 UTC

On 12/30/2023 9:51 PM, Bonita Montero wrote:
> Am 30.12.2023 um 20:58 schrieb Chris M. Thomasson:
>
>> Huh? Wow, you really need to write Intel a letter about it wrt their
>> older hyperthreaded processors! ...
>
> The suggestion Intel made at this point is superfluous.
>
>> Intel's suggestions for how to mitigate the problem in their earlier
>> hyperhtreaded processors actually worked wrt improving performance. ...
>
> I'm pretty sure they never ran the numbers on that.

I am pretty sure you never read that paper before, even now.

>
>

Re: Sieve of Erastosthenes optimized to the max

<umsgkn$1r3rf$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Sieve of Erastosthenes optimized to the max
Date: Sun, 31 Dec 2023 11:49:41 -0800
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <umsgkn$1r3rf$1@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
<um31o0$1edq3$1@dont-email.me>
<um4f1l$1l1c2$1@raubtier-asyl.eternal-september.org>
<um7haa$274oh$3@dont-email.me>
<um8vlp$2h8oc$1@raubtier-asyl.eternal-september.org>
<uma7i4$2nagg$1@dont-email.me>
<umdmkf$3clht$1@raubtier-asyl.eternal-september.org>
<umdovb$3cmi3$2@dont-email.me>
<ume6ap$3ecjk$1@raubtier-asyl.eternal-september.org>
<umfcqi$3jktj$2@dont-email.me> <20231226152712.582@kylheku.com>
<umfo3c$3l1oh$1@dont-email.me> <umgego$3r29p$1@dont-email.me>
<umgqe5$3sc4h$1@raubtier-asyl.eternal-september.org>
<20231227124453.126@kylheku.com>
<umjkg8$bqmr$1@raubtier-asyl.eternal-september.org>
<uml0sp$i3j7$1@dont-email.me>
<umldni$n9ob$1@raubtier-asyl.eternal-september.org>
<umljmb$nrkt$1@dont-email.me>
<umm582$pqb4$1@raubtier-asyl.eternal-september.org>
<20231229092738.13@kylheku.com>
<umo79t$165i5$2@raubtier-asyl.eternal-september.org>
<umpspm$1cphn$1@dont-email.me> <umq79v$1e6fb$1@redfloyd.dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 31 Dec 2023 19:49:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b3a45f802fb88652a535eaac0edd3bc6";
logging-data="1937263"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CfY39TxquJ79zGryFcc0bZ2n181Hloww="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:O/TtCkmratg4WsNMtbOZJpG6qSY=
In-Reply-To: <umq79v$1e6fb$1@redfloyd.dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 31 Dec 2023 19:49 UTC

On 12/30/2023 2:58 PM, red floyd wrote:
> On 12/30/2023 11:58 AM, Chris M. Thomasson wrote:
>> On 12/29/2023 8:45 PM, Bonita Montero wrote:
>>> Am 29.12.2023 um 18:29 schrieb Kaz Kylheku:
>>>
>>>> I explained it. The allocation is not used. When you call alloca(n),
>>>> the stack pointer moves by n bytes. If you then call a function,
>>>> its stack frame will be offset by that much (plus any alignment if
>>>> n is not aligned).
>>>
>>> According to the paper Scott mentioned the associativity of the
>>> Pentium 4's L1 data cache is four. With that it's not necessary
>>> to have such aliasing preventions.
>>>
>>
>> Huh? Wow, you really need to write Intel a letter about it wrt their
>> older hyperthreaded processors! Although, it seems like you simply do
>> not actually _understand_ what is going on here...
>>
>> Intel's suggestions for how to mitigate the problem in their earlier
>> hyperhtreaded processors actually worked wrt improving performance.
>> Keep in mind this was a while back in 2004-2005. I am happy that the
>> way back machine has my older code.
>
> Oh, come on, Chris.  It's clear that Bonita knows more about what's
> going on inside an Intel processor than Intel does.
>

Sometimes, I hope it is trolling. Afaict, Bonita seems to be full of
crap to a point where I actually feel sorry for the damn toilets it has
to punish.


devel / comp.lang.c++ / Re: Sieve of Erastosthenes optimized to the max

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor