Deutsch   English   Français   Italiano  
<vdj6i5$36qhp$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Vir Campestris <vir.campestris@invalid.invalid>
Newsgroups: alt.comp.lang.c,comp.lang.c
Subject: Re: A very slow program
Date: Wed, 2 Oct 2024 11:16:37 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <vdj6i5$36qhp$1@dont-email.me>
References: <vc7nb0$7rl3$1@paganini.bofh.team> <vc8fa1$2m1lh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 02 Oct 2024 12:16:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e56e54daf09c85184a6336540f7aa120";
	logging-data="3369529"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/VXuY8IMKkeozQWXnszwKgnVh23dKU2aQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:jvHUfWSltBdiRI6i2s7sfniPnFc=
In-Reply-To: <vc8fa1$2m1lh$1@dont-email.me>
Content-Language: en-GB
Bytes: 1942

On 16/09/2024 06:22, Paul wrote:
> Good prime code, comes with its own timing routines 🙂
> 
> http://cr.yp.to/primegen.html
> 
>     http://cr.yp.to/primegen/primegen-0.97.tar.gz
> 
>    Paul

I pricked my ears up when I saw this - I've been spending a quite 
ridiculous amount of time tuning prime code.

Happily for my sanity the program I published over on comp.lang.c++(1) 
is quite a bit faster than that one. On the other hand, I'm tuning for 
modern processors, and the comment in there say inter alia "It generates 
the 50847534 primes up to 1000000000 in just 8 seconds on a Pentium II-350"

I don't remember the last time I saw one of those.

<https://en.wikipedia.org/wiki/List_of_Intel_Pentium_II_processors>

tells me it was release in 1998...

Andy
-- 

(1) See thread "Sieve of Eratosthenes optimized to the max" and look for 
a post from me which is quite big