÷

 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
 mandelbrot1/101/3±
 fasta1/61/2±
 spectral-norm1/51/71/3
 n-body1/41/2±
 binary-trees1/3±±
 pidigits1/21/2±
 fannkuch1/21/2±
 k-nucleotide±±
 reverse-complement

± 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
 mandelbrot 
Lua512.60512.571,072353  0% 0% 0% 100%
Perl5,268.135,267.813,032311  0% 0% 0% 100%
 fasta 
Lua58.6558.651,1481039  0% 0% 0% 100%
Perl349.59349.572,112934  0% 1% 0% 100%
 spectral-norm 
Lua262.93262.911,136329  0% 0% 0% 100%
Perl1,184.331,184.267,792846  0% 0% 0% 100%
 n-body 
Lua537.00536.979281197  0% 0% 0% 100%
Perl1,911.921,911.802,1281140  0% 0% 0% 100%
 binary-trees 
Lua517.99517.96815,620443  0% 0% 0% 100%
Perl1,297.731,297.68643,488541  0% 0% 0% 100%
 pidigits 
Lua3.873.871,776479  0% 0% 0% 100%
Perl7.047.053,284385  0% 0% 0% 100%
 fannkuch 
Lua2,014.122,013.99904492  0% 0% 0% 100%
Perl3,160.503,160.311,692391  0% 0% 0% 100%
 k-nucleotide 
Lua217.60217.59675,524601  0% 0% 0% 100%
Perl249.61252.46709,264359  0% 0% 0% 100%
 reverse-complement 
Lua21.5821.58532,160538  0% 0% 0% 100%
Perl5.805.80124,036237  0% 0% 1% 100%
 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.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio

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

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

Revised BSD license