Deutsch   English   Français   Italiano  
<va0a8b$30cvv$2@dont-email.me>

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

Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Vir Campestris <vir.campestris@invalid.invalid>
Newsgroups: comp.lang.c++
Subject: Re: OT: Re: Sieve of Erastosthenes optimized to the max
Date: Mon, 19 Aug 2024 21:34:19 +0100
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <va0a8b$30cvv$2@dont-email.me>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
 <utoh9d$6lrr$1@raubtier-asyl.eternal-september.org>
 <utq0ag$hvrl$3@dont-email.me>
 <utq0os$ibqn$1@raubtier-asyl.eternal-september.org>
 <utq11p$icmm$1@dont-email.me> <v25c87$1ld9m$1@dont-email.me>
 <86r0duwqgg.fsf@linuxsc.com> <v39o3l$1lvju$1@dont-email.me>
 <86o78mpnlf.fsf@linuxsc.com> <v3fv2u$2ursd$1@dont-email.me>
 <86ttibod7n.fsf@linuxsc.com> <86h6eaoi2r.fsf@linuxsc.com>
 <v4sool$1grge$1@dont-email.me> <867celixcw.fsf@linuxsc.com>
 <v5sg9s$mat4$1@dont-email.me> <86zfr0b9hw.fsf@linuxsc.com>
 <v638ud$25623$1@dont-email.me> <861q3o5do1.fsf@linuxsc.com>
 <v7tdts$29195$1@dont-email.me> <868qx45v5g.fsf@linuxsc.com>
 <v9lbns$11alj$1@dont-email.me> <86r0aojx1m.fsf@linuxsc.com>
 <v9o2kf$1gqv1$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: Mon, 19 Aug 2024 22:34:19 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6c5de56f28e6ac663481e58aafaf9c86";
	logging-data="3159039"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/NDtAuSPiHK+BCIjBZPpWqIOYpfj4s4ew="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:zy8xa60YAS12oaTsaxgNjRffG/4=
Content-Language: en-GB
In-Reply-To: <v9o2kf$1gqv1$1@raubtier-asyl.eternal-september.org>
Bytes: 2721

On 16/08/2024 18:35, Bonita Montero wrote:
> But basically I don't think it is a good idea to skip numbers exept
> multiples of two. With the three you save a sixth of memory, with
> the five you save a 15-th and at the end you get about 20% less
> storage (1 / (2 * 3) + 1 / (2 * 3 * 5) + 1 / (2 * 3 * 5 * 7) ...)
> for a lot of computation. That's the point where I dropped this
> idea and I think this extra computation is higher than the time
> for the saved memory loads.

BTW I was just checking outputs.

	66049
	67591
	69133
	69647
	71189
	72217
	72731
	75301
	78899
	79927
	80441
	81469
	85067
	86609
	89179
	89693
	90721
	92263
	94319
	95861
	97403
	98431
	99973

all show in the output for your program, but not mine. I think you'll 
find they are products of 257 and the next few primes.

Andy