Sieve of Erathostenes Back to the Win32 Shootout
Back to dada's perl lab

[The Original Shootout]   [NEWS]   [FAQ]   [Methodology]   [Platform Details]   [Acknowledgements]   [Scorecard]  

Measurements while N varies

N is the number of times we compute the number of primes from 2 through 8192.


Measurement of CPU as N varies
  N
Test Source 1 300 600 900
vc++ 0.04 0.05 0.11 0.16
modula2 0.01 0.07 0.15 0.21
delphi 0.01 0.07 0.14 0.21
vc 0.01 0.07 0.14 0.22
gcc 0.02 0.10 0.16 0.23
bcc 0.01 0.08 0.16 0.24
mingw32 9999.00 0.09 0.16 0.24
lcc 0.01 0.09 0.17 0.25
ghc 0.30 0.31 0.31 0.31
ocaml 0.01 0.14 0.27 0.41
gnat 0.01 0.16 0.32 0.48
bigforth 0.01 0.19 0.36 0.54
mercury 0.03 0.24 0.46 0.67
vpascal 0.01 0.24 0.49 0.73
fpascal 0.01 0.29 0.56 0.84
csharp 0.10 0.38 0.65 0.93
se 0.02 0.32 0.64 0.97
java 0.45 0.70 0.94 1.19
nice 0.52 0.76 1.01 1.25
pliant 0.11 0.53 0.96 1.40
smlnj 0.04 0.59 1.15 1.70
gforth 0.04 0.73 1.42 2.10
poplisp 0.08 2.93 5.80 8.67
oz 0.17 4.18 8.21 12.27
lua5 0.03 5.46 10.92 16.35
parrot 0.03 5.48 10.95 16.39
erlang 0.49 6.12 11.81 17.50
ocamlb 0.03 6.02 12.01 18.00
lua 0.04 8.13 16.26 24.40
pike 0.12 8.44 16.65 24.89
python 0.22 9.60 19.01 28.42
slang 0.07 10.49 20.95 31.40
icon 0.05 12.77 25.54 38.27
awka 0.09 13.40 26.70 39.99
ici 0.07 13.94 27.86 41.68
cygperl 0.11 14.11 28.17 42.19
elastic 0.09 14.65 29.26 43.87
perl 0.10 14.67 29.31 43.92
guile 0.23 18.85 37.52 56.17
ruby 0.14 19.03 38.01 56.93
mawk 0.13 29.25 58.50 87.58
vbscript 0.25 29.49 58.77 88.07
php 0.19 44.38 85.77 127.16
tcl 0.24 49.35 98.59 147.84
jscript 0.42 59.97 118.41 176.84
gawk 0.29 75.09 150.09 225.09
rebol F F F F
rexx 0.41 115.11 230.35 T
Measurement of Memory as N varies
  N
Test Source 1 300 600 900
vc++ 524 524 524 524
modula2 640 640 640 640
delphi 592 592 592 592
vc 472 472 472 472
gcc 1512 1512 1512 1512
bcc 572 572 572 572
mingw32 520 520 520 520
lcc 516 516 516 516
ghc 2060 2064 2064 2064
ocaml 660 660 660 660
gnat 732 732 732 732
bigforth 920 920 920 920
mercury 1800 1872 1872 1872
vpascal 596 596 596 596
fpascal 536 536 536 536
csharp 3320 3316 3316 3320
se 560 560 560 560
java 4584 4584 4584 4584
nice 4920 4920 4920 4920
pliant 3252 3252 3252 3252
smlnj 936 936 936 936
gforth 1492 1492 1492 1492
poplisp 3296 3296 3296 3296
oz 648 648 648 648
lua5 752 752 752 752
parrot 1448 1448 1448 1448
erlang 5336 5304 5300 5300
ocamlb 380 380 380 380
lua 1080 1080 1080 1080
pike 3472 3552 3552 3572
python 2412 2444 2444 2444
slang 1844 1844 1844 1844
icon 772 1088 1088 1088
awka 2240 2240 2240 2240
ici 1180 1212 1212 1212
cygperl 2860 2860 2860 2860
elastic 2020 2020 2020 2020
perl 1888 1888 1888 1888
guile 2688 2720 2720 2720
ruby 1972 2276 2280 2300
mawk 1916 1916 1916 1916
vbscript 2424 2424 2424 2424
php 3756 4712 4740 4760
tcl 2076 2076 2076 2076
jscript 3836 4744 4784 4804
gawk 2472 2472 2472 2472
rebol F F F F
rexx 1784 1784 1784 T

The following graph is similar to the graph on the index page, but here, N is much smaller, and startup costs may be more prominent.





[Note: Values have been normalized to fall in the range of 0-10 for aesthetic reasons. Original value ranges are included on the X-axis.
Source Code CPU (sec) Mem (KB) Lines Code Log
gnat 0.01 732 0 log
delphi 0.01 592 23 log
bigforth 0.01 920 33 log
ocaml 0.01 660 23 log
modula2 0.01 640 0 log
vc 0.01 472 25 log
vpascal 0.01 596 35 log
lcc 0.01 516 25 log
fpascal 0.01 536 35 log
bcc 0.01 572 25 log
gcc 0.02 1512 25 log
se 0.02 560 57 log
lua5 0.03 752 22 log
mercury 0.03 1800 32 log
parrot 0.03 1448 28 log
ocamlb 0.03 380 23 log
gforth 0.04 1492 33 log
lua 0.04 1080 23 log
vc++ 0.04 524 24 log
smlnj 0.04 936 34 log
icon 0.05 772 15 log
slang 0.07 1844 29 log
ici 0.07 1180 16 log
poplisp 0.08 3296 10 log
elastic 0.09 2020 29 log
awka 0.09 2240 17 log
perl 0.10 1888 18 log
csharp 0.10 3320 27 log
cygperl 0.11 2860 18 log
pliant 0.11 3252 21 log
pike 0.12 3472 20 log
mawk 0.13 1916 17 log
ruby 0.14 1972 15 log
oz 0.17 648 19 log
php 0.19 3756 17 log
python 0.22 2412 15 log
guile 0.23 2688 17 log
tcl 0.24 2076 24 log
vbscript 0.25 2424 20 log
gawk 0.29 2472 17 log
ghc 0.30 2060 11 log
rexx 0.41 1784 20 log
jscript 0.42 3836 22 log
java 0.45 4584 22 log
erlang 0.49 5336 30 log
nice 0.52 4920 0 log
mingw32 9999.00 520 25 log
rebol F F 23 log


Back to the Win32 Shootout
Back to dada's perl lab
Send comments or suggestions to dada@perl.it