All pastes #2589 Raw Edit

infi prime calculation benchmarks

public text v1 · immutable
#2589 ·published 2004-12-02 23:07 UTC
rendered paste body
(@ti) ok, further example of suckitude
 (@ti) $ time java Primes
 (@ti) 20000003 20000023 20000033 20000047 20000059 20000063 20000069 20000077
 20000081 20000093 
 (@ti) real    0m48.628s
 (@ti) $ time ./primes
 (@ti) 20000003 20000023 20000033 20000047 20000059 20000063 20000069 20000077
 20000081 20000093 
 (@ti) real    0m9.782s
 (@ti) calculating the primes from 20000000 to 20000100
 (@ti) identical programs in C and java
 (@ti) so yes, it appears to be linear
 (@ti) or closely linear
 (@ti) ok, now I don't feel so bad.
 (@ti) $ time ./primes.pl 
 (@ti) 20000003 20000023 20000033 20000047 20000059 20000063 20000069 20000077
 20000081 20000093 
 (@ti) real    6m30.406s
 (@ti) $ time ./primes2.py 
 (@ti) 20000003,  20000023,  20000033,  20000047,  20000059,  20000063, 
 20000069,  20000077,  20000081,  20000093, 
 (@ti) real    7m43.761s