/mobile Handheld Friendly website
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× | 2× | 1/4 | |
| fasta | 11× | 1/13 | ± | |
| reverse-complement | 11× | ± | ± | |
| spectral-norm | 13× | 1/17 | 1/3 | |
| n-body | 19× | 1/17 | ± | |
| binary-trees | 29× | 3× | ± | |
| mandelbrot | 30× | 1/65 | 1/2 | |
| fannkuch-redux | 30× | 1/18 | 1/3 | |
| pidigits | 43× | 1/13 | ± | |
| Lua used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 2× | 2× | 11× | 16× | 30× | 43× | 43× |
± 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 | 43.75 | 43.79 | 317,292 | 437 | 0% 0% 0% 100% |
| Java 7 -server | 21.58 | 21.61 | 557,612 | 1284 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Lua | 234.85 | 235.54 | 621,616 | 613 | 0% 0% 0% 100% |
| Java 7 -server | 33.81 | 33.93 | 336,388 | 2431 | 0% 0% 0% 100% |
| fasta | |||||
| Lua | 52.68 | 52.69 | 1,140 | 1049 | 0% 0% 0% 100% |
| Java 7 -server | 4.92 | 4.92 | 14,828 | 1507 | 1% 0% 0% 100% |
| reverse-complement | |||||
| Lua | 21.31 | 21.32 | 468,776 | 555 | 0% 0% 0% 100% |
| Java 7 -server | 1.87 | 1.90 | 511,340 | 745 | 1% 1% 0% 100% |
| spectral-norm | |||||
| Lua | 204.50 | 204.54 | 892 | 329 | 0% 0% 0% 100% |
| Java 7 -server | 16.21 | 16.21 | 14,860 | 950 | 0% 0% 0% 100% |
| n-body | |||||
| Lua | 468.37 | 468.46 | 796 | 1305 | 0% 0% 0% 100% |
| Java 7 -server | 24.32 | 24.33 | 13,744 | 1424 | 0% 0% 0% 100% |
| binary-trees | |||||
| Lua | 456.87 | 457.33 | 1,700,676 | 446 | 0% 0% 0% 100% |
| Java 7 -server | 15.64 | 15.68 | 506,672 | 603 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Lua | 794.37 | 794.53 | 1,044 | 353 | 0% 0% 0% 100% |
| Java 7 -server | 26.86 | 26.87 | 67,760 | 796 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Lua | 2,120.67 | 2,121.06 | 776 | 462 | 0% 0% 0% 100% |
| Java 7 -server | 71.27 | 71.29 | 13,856 | 1282 | 0% 0% 0% 100% |
| pidigits | |||||
| Lua | 236.24 | 236.29 | 1,332 | 1144 | 0% 0% 0% 100% |
| Java 7 -server | 5.44 | 5.44 | 16,944 | 938 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.11 | 0.11 | ? | 1443 | 0% 0% 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