÷

 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/71/15±
 fasta1/61/2±
 n-body1/41/2±
 binary-trees1/2±±
 pidigits1/21/2±
 spectral-norm±1/71/3
 fannkuch1/7±
 k-nucleotide1/4±
 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 
Lua668.32192.8320,004607  81% 95% 84% 85%
Perl5,578.831,436.69291,628550  97% 97% 97% 97%
 fasta 
Lua58.6358.631,1481039  0% 100% 0% 0%
Perl339.78339.762,112934  100% 0% 0% 0%
 n-body 
Lua539.13539.119281197  1% 0% 0% 99%
Perl1,914.131,914.022,1281140  0% 0% 0% 100%
 binary-trees 
Lua523.78523.76815,616443  47% 53% 0% 0%
Perl1,292.441,292.38643,488541  0% 0% 100% 0%
 pidigits 
Lua3.883.881,772479  100% 0% 0% 0%
Perl7.037.033,284385  0% 0% 0% 100%
 spectral-norm 
Lua262.23262.221,132329  0% 0% 100% 0%
Perl1,212.30304.617,792846  100% 100% 99% 100%
 fannkuch 
Lua2,010.322,010.22904492  100% 0% 0% 0%
Perl4,206.051,062.526,020471  99% 99% 99% 100%
 k-nucleotide 
Lua216.59216.58619,440601  100% 0% 0% 0%
Perl281.5788.722,774,904648  78% 73% 88% 83%
 reverse-complement 
Lua21.9021.90517,760538  100% 0% 0% 0%
Perl5.785.79124,036237  0% 0% 0% 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