/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-nucleotide1/4
 fasta11×1/13±
 reverse-complement11×±±
 spectral-norm13×1/171/3
 n-body19×1/17±
 binary-trees29×±
 mandelbrot30×1/651/2
 fannkuch-redux30×1/181/3
 pidigits43×1/13±
 Lua used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)11×16×30×43×43×

± 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 
Lua43.7543.79317,292437  0% 0% 0% 100%
Java 7 -server21.5821.61557,6121284  0% 0% 0% 100%
 k-nucleotide 
Lua234.85235.54621,616613  0% 0% 0% 100%
Java 7 -server33.8133.93336,3882431  0% 0% 0% 100%
 fasta 
Lua52.6852.691,1401049  0% 0% 0% 100%
Java 7 -server4.924.9214,8281507  1% 0% 0% 100%
 reverse-complement 
Lua21.3121.32468,776555  0% 0% 0% 100%
Java 7 -server1.871.90511,340745  1% 1% 0% 100%
 spectral-norm 
Lua204.50204.54892329  0% 0% 0% 100%
Java 7 -server16.2116.2114,860950  0% 0% 0% 100%
 n-body 
Lua468.37468.467961305  0% 0% 0% 100%
Java 7 -server24.3224.3313,7441424  0% 0% 0% 100%
 binary-trees 
Lua456.87457.331,700,676446  0% 0% 0% 100%
Java 7 -server15.6415.68506,672603  0% 0% 0% 100%
 mandelbrot 
Lua794.37794.531,044353  0% 0% 0% 100%
Java 7 -server26.8626.8767,760796  0% 0% 0% 100%
 fannkuch-redux 
Lua2,120.672,121.06776462  0% 0% 0% 100%
Java 7 -server71.2771.2913,8561282  0% 0% 0% 100%
 pidigits 
Lua236.24236.291,3321144  0% 0% 0% 100%
Java 7 -server5.445.4416,944938  0% 0% 0% 100%
 fasta-redux 
No program
Java 7 -server0.110.11?1443  0% 0% 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