/mobile Handheld Friendly website

÷

 Step 1 : Are the Lua programs faster? At a glance.

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.

 Step 2 : Are the Lua programs faster? Approximately.

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-dna1/21/3
 k-nucleotide±1/4
 fasta1/12±
 reverse-complement10×±±
 spectral-norm14×1/151/2
 n-body19×1/17±
 binary-trees29×±
 fannkuch-redux30×1/171/3
 mandelbrot32×1/501/2
 pidigits36×1/241/2
 Lua used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)17×30×36×36×

± read the measurements and then read the program source code.

 Step 3 : Are the Lua programs faster? Measurements.

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 
Lua44.5044.55318,856437  0% 0% 0% 100%
Java 7 -server22.9523.00561,4361284  0% 0% 0% 100%
 k-nucleotide 
Lua206.98208.84532,088613  0% 0% 0% 100%
Java 7 -server29.0229.10521,8202431  0% 0% 0% 100%
 fasta 
Lua46.3346.341,5121049  0% 0% 0% 100%
Java 7 -server5.185.1918,0441507  1% 0% 1% 100%
 reverse-complement 
Lua18.3218.33491,188555  0% 0% 0% 100%
Java 7 -server1.791.83514,512745  2% 1% 2% 100%
 spectral-norm 
Lua244.38244.431,248329  0% 0% 0% 100%
Java 7 -server16.9917.0018,244514  0% 0% 0% 100%
 n-body 
Lua434.09434.181,0001193  0% 0% 0% 100%
Java 7 -server22.5122.5116,9401424  0% 0% 0% 100%
 binary-trees 
Lua470.34470.912,515,776446  0% 0% 0% 100%
Java 7 -server16.4416.48499,416603  0% 0% 0% 100%
 fannkuch-redux 
Lua2,118.962,119.35976462  0% 0% 0% 100%
Java 7 -server69.9669.9917,0201282  0% 0% 0% 100%
 mandelbrot 
Lua759.08759.231,384353  0% 0% 0% 100%
Java 7 -server23.7423.7569,696796  0% 0% 0% 100%
 pidigits 
Lua215.97216.022,1961144  0% 0% 0% 100%
Java 7 -server6.006.0153,7681826  1% 0% 0% 100%
 fasta-redux 
No program
Java 7 -server0.120.12?1443  0% 8% 0% 100%

 Step 4 : Are there other Lua programs for these benchmarks?

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.

 Step 5 : Are there other faster programs for these benchmarks?

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.

 Lua : associative arrays for extensible embedded scripting 

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

Revised BSD license

  Home   Conclusions   License   Help