Sujet : Re: OT: Re: A very slow program
De : vir.campestris (at) *nospam* invalid.invalid (Vir Campestris)
Groupes : alt.comp.lang.c comp.lang.cDate : 28. Oct 2024, 18:21:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vfodm4$12hve$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla Thunderbird
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