÷

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

This chart shows 3 comparisons - Time-used, Memory-used and Code-used.

Each chart bar shows, for one unidentified benchmark, how much the fastest Lua program used compared to the fastest Perl program.


 Step 2 : Are the Lua programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used.

Each table row shows, for one named benchmark, how much the fastest Lua program used compared to the fastest Perl program.

 Lua used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 recursive1/71/4±
 spectral-norm1/6±±
 mandelbrot1/6±±
 fasta1/41/3±
 nsieve1/3±±
 n-body1/3±
 partial-sums1/31/4±
 fannkuch1/2±±
 nsieve-bits±
 k-nucleotide±±
 sum-file±±±
 reverse-complement±
 pidigits25×1/2

± 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.

For each named benchmark, measurements of the fastest Lua program are shown for comparison against measurements of the fastest Perl program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 recursive 
Lua129.122,840330  
Perl956.3110,812380  
 spectral-norm 
Lua698.8518,520328  
Perl3,943.6318,536334  
 mandelbrot 
Lua69.063,332367  
Perl382.653,388311  
 fasta 
Lua199.741,236993  
Perl850.673,156934  
 nsieve 
Lua21.39197,520258  
Perl60.70242,316290  
 n-body 
Lua561.398,2961265  
Perl1,567.731,9041140  
 partial-sums 
Lua5.50868437  
Perl14.233,156389  
 fannkuch 
Lua404.073,136469  
Perl728.503,144348  
 nsieve-bits 
Lua94.577,072426  
Perl93.554,024253  
 k-nucleotide 
Lua29.7336,680613  
Perl27.5442,836359  
 sum-file 
Lua18.4914,90082  
Perl15.5514,91684  
 reverse-complement 
Lua7.0630,828538  
Perl1.9938,356298  
 pidigits 
Lua152.241,4281005  
Perl6.213,144385  
 binary-trees
   No program
 chameneos-redux
   No program
 regex-dna
   No program

 Measurements for all the accepted programs

 Lua : associative arrays for extensible embedded scripting 

online book "Programming in Lua" by Roberto Ierusalimschy

"the evolution of Lua" (pdf slides)

Lua 5.1.3

Home Page: http://www.lua.org/

Download: http://www.lua.org/download.html

Revised BSD license