in reply to RE: sieve of Eratosthenes
in thread sieve of erothenes
I went back and uncomment the print statements to see what kind of overhead the grep might cause. At N=100000 I end up with:
I would have expected us to end up with closer times, but your's ends up being 24 seconds faster? wow. So, I removed the prints and got:Benchmark: timing 100 iterations of Ase, Maverick... Ase: 142 wallclock secs (141.93 usr + 0.04 sys = 141.97 CPU) Maverick: 166 wallclock secs (166.05 usr + 0.00 sys = 166.05 CPU)
I'm running this on a PII 400, using Red Hat Linux and the stock perl RPM (5.005_03). It would seem that vec is much faster under Linux than under windows.Benchmark: timing 100 iterations of Ase, Maverick... Ase: 122 wallclock secs (121.11 usr + 0.00 sys = 121.11 CPU) Maverick: 164 wallclock secs (164.65 usr + 0.03 sys = 164.68 CPU)
Hmmm...I wonder how these benchmark out on other platforms...
/\/\averick
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: sieve of Eratosthenes
by ase (Monk) on Jul 02, 2000 at 06:50 UTC |