OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each chart bar shows, for one unidentified benchmark, how much the fastest Lua program used compared to the fastest Java 6 -Xint program.
This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each table row shows, for one named benchmark, how much the fastest Lua program used compared to the fastest Java 6 -Xint program.
| Lua used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| regex-dna | 1/13 | 1/2 | 1/2 | |
| k-nucleotide | 1/5 | 1/2 | 1/2 | |
| partial-sums | 1/2 | 1/8 | 1/2 | |
| mandelbrot | ± | 1/11 | 1/2 | |
| reverse-complement | ± | ± | ± | |
| spectral-norm | ± | 1/10 | 1/2 | |
| fasta | ± | 1/8 | ± | |
| n-body | ± | 1/11 | ± | |
| recursive | 2× | 1/10 | ± | |
| fannkuch | 2× | 1/8 | ± | |
| binary-trees | 3× | ± | ± | |
| pidigits | 3× | ± | ± | |
| nsieve | 4× | 5× | ± | |
| nsieve-bits | 5× | 1/4 | ± | |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.
For each named benchmark, measurements of the fastest Lua program are shown for comparison against measurements of the fastest Java 6 -Xint program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| regex-dna | |||||
| Lua | 9.89 | 32,908 | 427 | ||
| Java 6 -Xint | 130.26 | 66,972 | 921 | ||
| k-nucleotide | |||||
| Lua | 35.43 | 38,248 | 613 | ||
| Java 6 -Xint | 174.59 | 68,312 | 1052 | ||
| partial-sums | |||||
| Lua | 7.45 | 900 | 437 | ||
| Java 6 -Xint | 13.19 | 7,120 | 711 | ||
| mandelbrot | |||||
| Lua | 3.02 | 868 | 367 | ||
| Java 6 -Xint | 3.68 | 9,388 | 665 | ||
| reverse-complement | |||||
| Lua | 8.85 | 43,000 | 538 | ||
| Java 6 -Xint | 8.63 | 57,188 | 592 | ||
| spectral-norm | |||||
| Lua | 727.88 | 1,100 | 328 | ||
| Java 6 -Xint | 660.73 | 10,584 | 514 | ||
| fasta | |||||
| Lua | 213.66 | 904 | 993 | ||
| Java 6 -Xint | 146.29 | 7,152 | 1240 | ||
| n-body | |||||
| Lua | 586.85 | 872 | 1265 | ||
| Java 6 -Xint | 400.61 | 9,556 | 1424 | ||
| recursive | |||||
| Lua | 4.86 | 992 | 330 | ||
| Java 6 -Xint | 3.18 | 9,752 | 427 | ||
| fannkuch | |||||
| Lua | 3.21 | 864 | 469 | ||
| Java 6 -Xint | 1.68 | 7,092 | 555 | ||
| binary-trees | |||||
| Lua | 55.69 | 34,464 | 470 | ||
| Java 6 -Xint | 21.46 | 24,364 | 603 | ||
| pidigits | |||||
| Lua | 0.59 | 5,324 | 684 | ||
| Java 6 -Xint | 0.21 | 7,716 | 938 | ||
| nsieve | |||||
| Lua | 10.93 | 99,276 | 258 | ||
| Java 6 -Xint | 2.99 | 19,388 | 296 | ||
| nsieve-bits | |||||
| Lua | 23.63 | 2,512 | 426 | ||
| Java 6 -Xint | 4.63 | 10,000 | 423 | ||
| chameneos-redux | |||||
| Java 6 -Xint | 0.73 | 10,332 | 1429 | ||
Remember - those are just the fastest Lua and Java 6 -Xint programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Lua.
Maybe one of those other Lua programs is fastest on a different OS/machine.
Remember - those are just the fastest Lua and Java 6 -Xint programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.
Maybe one of those other programs is fastest on a different OS/machine.
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