/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
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 7 -server program.
Look at speed another way - look at a box plot of Time-used data.
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 7 -server program.
| Lua used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| regex-dna | 2× | 1/2 | 1/3 | |
| k-nucleotide | 7× | ± | 1/4 | |
| fasta | 9× | 1/12 | ± | |
| reverse-complement | 10× | ± | ± | |
| spectral-norm | 14× | 1/15 | 1/2 | |
| n-body | 19× | 1/17 | ± | |
| binary-trees | 29× | 5× | ± | |
| fannkuch-redux | 30× | 1/17 | 1/3 | |
| mandelbrot | 32× | 1/50 | 1/2 | |
| pidigits | 36× | 1/24 | 1/2 | |
| Lua used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 2× | 2× | 9× | 17× | 30× | 36× | 36× |
± 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 7 -server program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| regex-dna | |||||
| Lua | 44.50 | 44.55 | 318,856 | 437 | 0% 0% 0% 100% |
| Java 7 -server | 22.95 | 23.00 | 561,436 | 1284 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Lua | 206.98 | 208.84 | 532,088 | 613 | 0% 0% 0% 100% |
| Java 7 -server | 29.02 | 29.10 | 521,820 | 2431 | 0% 0% 0% 100% |
| fasta | |||||
| Lua | 46.33 | 46.34 | 1,512 | 1049 | 0% 0% 0% 100% |
| Java 7 -server | 5.18 | 5.19 | 18,044 | 1507 | 1% 0% 1% 100% |
| reverse-complement | |||||
| Lua | 18.32 | 18.33 | 491,188 | 555 | 0% 0% 0% 100% |
| Java 7 -server | 1.79 | 1.83 | 514,512 | 745 | 2% 1% 2% 100% |
| spectral-norm | |||||
| Lua | 244.38 | 244.43 | 1,248 | 329 | 0% 0% 0% 100% |
| Java 7 -server | 16.99 | 17.00 | 18,244 | 514 | 0% 0% 0% 100% |
| n-body | |||||
| Lua | 434.09 | 434.18 | 1,000 | 1193 | 0% 0% 0% 100% |
| Java 7 -server | 22.51 | 22.51 | 16,940 | 1424 | 0% 0% 0% 100% |
| binary-trees | |||||
| Lua | 470.34 | 470.91 | 2,515,776 | 446 | 0% 0% 0% 100% |
| Java 7 -server | 16.44 | 16.48 | 499,416 | 603 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Lua | 2,118.96 | 2,119.35 | 976 | 462 | 0% 0% 0% 100% |
| Java 7 -server | 69.96 | 69.99 | 17,020 | 1282 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Lua | 759.08 | 759.23 | 1,384 | 353 | 0% 0% 0% 100% |
| Java 7 -server | 23.74 | 23.75 | 69,696 | 796 | 0% 0% 0% 100% |
| pidigits | |||||
| Lua | 215.97 | 216.02 | 2,196 | 1144 | 0% 0% 0% 100% |
| Java 7 -server | 6.00 | 6.01 | 53,768 | 1826 | 1% 0% 0% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.12 | 0.12 | ? | 1443 | 0% 8% 0% 100% |
Remember - those are just the fastest Lua and Java 7 -server 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 7 -server 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
"Game Developers Conference 2010 Lua Tutorial" (slides)
Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
Home Page: http://www.lua.org/
Download: http://www.lua.org/download.html