Deutsch English Français Italiano |
<vfjhs2$3rs90$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.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: OT: Re: A very slow program Date: Sat, 26 Oct 2024 21:02:10 +0100 Organization: A noiseless patient Spider Lines: 22 Message-ID: <vfjhs2$3rs90$1@dont-email.me> References: <vc7nb0$7rl3$1@paganini.bofh.team> <vdjf67$3840f$1@raubtier-asyl.eternal-september.org> <vdmfdl$3pknu$1@dont-email.me> <vdnsav$3ucm$1@raubtier-asyl.eternal-september.org> <vf2n7i$cko5$1@dont-email.me> <vf5sdt$10dmr$1@raubtier-asyl.eternal-september.org> <vfiua8$3obkb$2@dont-email.me> <vfiuj9$3ol7o$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, 26 Oct 2024 22:02:10 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1a34abd57199070a12913a6a127db11a"; logging-data="4059424"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192Z4IaO5cORJUQOEJBsEjRL18vAkBjrf8=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:MlY50Ff6QRHQJoUWlP0t+LfJvP8= Content-Language: en-GB In-Reply-To: <vfiuj9$3ol7o$1@raubtier-asyl.eternal-september.org> Bytes: 2083 On 26/10/2024 15:33, Bonita Montero wrote: > Am 26.10.2024 um 16:28 schrieb Vir Campestris: > >> You're on Windows aren't you? I do know you have a far more powerful >> machine than I do. I'm running Ubuntu with Gnu compiler. (I tried >> Clang, but it's slower) > > I compared your code against mine on a AMD 7950X. > > Which operating system, and which compiler? It's probably also worth trying for a much larger number of primes. I wrote my command line parser so it will try to read the number as a double if it isn't an integer. For 100000000000 primes my code on my machine is 39s, and yours is 3:46. (I've got the mod30 version down to 28s now, but met an intractable optimiser funny) Andy