Sujet : Re: OT: Re: Sieve of Erastosthenes optimized to the max
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.c++Date : 20. Aug 2024, 17:43:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va2dik$3eemd$1@raubtier-asyl.eternal-september.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
User-Agent : Mozilla Thunderbird
Am 20.08.2024 um 17:24 schrieb Bonita Montero:
C:\Users\Boni\Documents\Source\bitmapSieve>timep "x64\Release- clang++\bitmapSieve.exe" 0x100000000 "" 1
real 1.795s
user 1.766s
sys 0.000s
cylces 8.011.804.500
Thats less than half the computation time.
And printing the primees to a file is rather slow with your code
as you use C++ stream I/O.
C:\Users\Boni\Documents\Source\test>timep x64\Release-clang-cl\test.exe 4294967296 primes.txt
tinyCount 7 smallCount 10 bigCache 0x80000
real 41.756s
user 36.734s
sys 4.734s
cylces 186.843.020.132
This is my code:
C:\Users\Boni\Documents\Source\bitmapSieve>timep "x64\Release-clang++\bitmapSieve.exe" 4294967296 primes.txt
real 6.460s
user 5.828s
sys 4.344s
cylces 46.660.685.085