Deutsch English Français Italiano |
<va09jq$30cvv$1@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:23:22 +0100 Organization: A noiseless patient Spider Lines: 17 Message-ID: <va09jq$30cvv$1@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:23:23 +0200 (CEST) Injection-Info: dont-email.me; posting-host="6c5de56f28e6ac663481e58aafaf9c86"; logging-data="3159039"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/XwQgfy4WkloFBEW+USCeosnDMErUnlw=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Z/VfzROj0uFrrzKHK6rAAtxH4ao= In-Reply-To: <v9o2kf$1gqv1$1@raubtier-asyl.eternal-september.org> Content-Language: en-GB Bytes: 2611 On 16/08/2024 18:35, Bonita Montero wrote: <snip> > 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. > It's not just storage you save, it's also computation. That program I published up-thread is almost as fast as yours - within 10% of the elapsed time - while only using a single core. The amount of CPU used is much lower. Andy