OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
Do the Lua programs use optimized assembly code libraries? Are they small simple programs or very optimized programs? Do the Lua programs use a fraction of the time used by other programs or do they use several times more?
| Lua used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Programs | Time | Memory | Code | Reduced N |
| ↓ recursive | 1/8 | 1/5 | ± | |
| ↓ spectral-norm | 1/6 | 1/2 | ± | |
| ↓ mandelbrot | 1/5 | 1/2 | ± | |
| ↓ fasta | 1/4 | 1/2 | ± | |
| ↓ n-body | 1/3 | 1/2 | ± | |
| ↓ partial-sums | 1/2 | 1/2 | ± | |
| ↓ nsieve | 1/2 | ± | ± | |
| ↓ fannkuch | 1/2 | 1/2 | ± | |
| ↓ nsieve-bits | ± | 2× | 2× | |
| ↓ k-nucleotide | ± | ± | 2× | |
| ↓ sum-file | ± | 1/2 | ± | |
| ↓ reverse-complement | 4× | ± | 2× | |
| ↓ pidigits | 11× | 1/2 | 3× | |
± look at the measurements and then look at the programs.
| Program & Logs | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
|---|---|---|---|---|---|
| recursive | |||||
| Lua | 114.38 | 2,280 | 330 | ||
| Perl | 898.78 | 10,836 | 380 | ||
| spectral-norm | |||||
| Lua | 727.88 | 1,100 | 328 | ||
| Perl | 4,089.08 | 2,468 | 334 | ||
| mandelbrot | |||||
| Lua | 83.21 | 864 | 367 | ||
| Perl | 403.20 | 1,724 | 311 | ||
| fasta | |||||
| Lua | 213.66 | 904 | 993 | ||
| Perl | 950.04 | 1,872 | 934 | ||
| n-body | |||||
| Lua | 586.85 | 872 | 1265 | ||
| Perl | 1,697.59 | 1,936 | 1140 | ||
| partial-sums | |||||
| Lua | 7.45 | 900 | 437 | ||
| Perl | 17.41 | 1,476 | 389 | ||
| nsieve | |||||
| Lua | 10.93 | 99,276 | 258 | ||
| Perl | 25.45 | 121,904 | 290 | ||
| fannkuch | |||||
| Lua | 508.06 | 864 | 469 | ||
| Perl | 855.72 | 1,492 | 348 | ||
| nsieve-bits | |||||
| Lua | 99.67 | 7,120 | 426 | ||
| Perl | 100.18 | 4,004 | 253 | ||
| k-nucleotide | |||||
| Lua | 35.43 | 38,248 | 613 | ||
| Perl | 32.07 | 42,816 | 359 | ||
| sum-file | |||||
| Lua | 21.84 | 840 | 82 | ||
| Perl | 18.17 | 1,468 | 84 | ||
| reverse-complement | |||||
| Lua | 8.85 | 43,000 | 538 | ||
| Perl | 1.99 | 38,360 | 298 | ||
| pidigits | |||||
| Lua | 41.43 | 1,148 | 1005 | ||
| Perl | 3.61 | 2,532 | 385 | ||
| binary-trees | |||||
| chameneos-redux | |||||
| regex-dna | |||||
online book "Programming in Lua" by Roberto Ierusalimschy
"the evolution of Lua" (pdf slides)
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
Home Page: http://www.lua.org/
Download: http://www.lua.org/download.html