Re: OT: Re: A very slow program
Vir Campestris <[email protected]> Mon, 28 Oct 2024 16:21:24 +0000
| Newsgroups | alt.comp.lang.c,comp.lang.c |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On 27/10/2024 05:02, Bonita Montero wrote: > Am 26.10.2024 um 22:02 schrieb Vir Campestris: > >> Which operating system, and which compiler? > > Win11, clang-cl 17.0.3. MSVC is about the same performance. > The plot thickens. I'm in Ubuntu 24.01 LTS. I normally use Gnu C++, g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0. Using g++ for 10000000000 primes my code took 3.3s, and yours 22.7. If I rebuild them using clang (Ubuntu clang version 18.1.3) then my code takes 14.5s (far slower) and yours takes 11.6 (much quicker than with Gnu and a bit quicker than mine). Andy