Confusing performance results for prime

Greg Brunet gregbrunet at NOSPAMsempersoft.com
Sat Oct 18 16:54:57 EDT 2003


Thanks for your results.  That got me to do some more checking with
algorithm differences, and I've posted those results in my response to
Bengt.  I guess I'm mentally stuck in 16 bit mode, forgetting that I
could have cast to an int instead of a long.

-- 
Greg


"Georgy Pruss" <SEE_AT_THE_END at hotmail.com> wrote in message
news:jJ4kb.22260$VG6.1493 at twister.southeast.rr.com...
> I did the tests for the original Primes1 & 2 (only changed
> range --> xrange and sqrt --> int(sqrt)) and your Primes3
>
> Primes1: 9592 primes up to 100000 in 0.547 secs
> Primes2: 9592 primes up to 100000 in 0.813 secs (+48.6%)
> Primes3: 9592 primes up to 100000 in 0.578 secs (+5.7%)
>
> Primes1: 49098 primes up to 600000 in 5.047 secs
> Primes2: 49098 primes up to 600000 in 8.844 secs (+75.2%)
> Primes3: 49098 primes up to 600000 in 5.922 secs (+17.3%)
>
> Primes1: 107126 primes up to 1400000 in 14.469 secs
> Primes2: 107126 primes up to 1400000 in 27.453 secs (+89.7%)
> Primes3: 107126 primes up to 1400000 in 17.203 secs (+18.9%)
>
> Georgy
> E^mail: 'ZDAwMTEyMHQwMzMwQGhvdG1haWwuY29t\n'.decode('base64')





More information about the Python-list mailing list