shootout - nsieve-bits benchmark
Ulf Wiger (AL/EAB)
Fri Apr 21 19:00:45 CEST 2006
I noticed that Erlang HiPE times out on the nsieve-bits benchmark.
That's not very flattering, since the upper limit is 3600 seconds. (:
I did some tests with the posted Erlang version, and it does take a
_very_ long time for large input (it also seems to return incorrect
values as N increases. I don't know why.)
I attach a version that uses an ordered_set ets table for a bit array.
Ruby (assuming that the Pentium 4 box performs at least as well as my
SunBLADE). It also matches the output of the other implementations (it
also seems to agree with Doug Bagley's old sieve program, found at
I haven't submitted it. Does anyone have a better implementation?
Primes up to 5120000 356244
Primes up to 2560000 187134
Primes up to 1280000 98610
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3409 bytes
More information about the erlang-questions