Re: OT: Re: A very slow program
Vir Campestris <[email protected]> Sat, 26 Oct 2024 21:02:10 +0100
| Newsgroups | alt.comp.lang.c,comp.lang.c |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
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