1 : At a glance - Are the Perl programs faster?

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

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Approximately - Are the Perl programs faster?

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

(Memory use is only compared for tasks that require memory to be allocated.)

 Perl used what fraction? used how many times more? 
Benchmark Time Memory Code
 spectral-norm1/2 ±
 regex-dna±1/2±
 k-nucleotide±1/21/2
 fannkuch-redux± ±
 binary-trees±1/3±
 n-body ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/2±±±

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

 3 : Measurements - Are the Perl programs faster?

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
Perl183.01183.065,292340  1% 0% 1% 100%
Lua350.78350.861,100329  1% 0% 1% 100%
 regex-dna 
Perl25.5725.60139,096527  0% 1% 1% 100%
Lua31.2631.27340,104596  0% 1% 1% 100%
 k-nucleotide 
Perl211.38214.42465,444359  0% 1% 1% 100%
Lua242.00242.46724,636613  0% 1% 1% 100%
 fannkuch-redux 
Perl2,509.292,510.031,468457  0% 1% 1% 100%
Lua2,593.042,593.59820462  1% 0% 1% 100%
 binary-trees 
Perl589.65590.05330,760448  1% 1% 0% 100%
Lua481.98482.571,035,484446  0% 1% 1% 100%
 n-body 
Perl1,158.931,159.262,2641401  0% 1% 1% 100%
Lua594.32594.468721305  0% 0% 1% 100%
 fasta-redux 
Perl0.810.832,528854  1% 0% 0% 99%
No program
 fasta 
Perl1.011.063,056838  2% 0% 0% 100%
LuaFailed
 pidigits 
Perl0.300.30420261  0% 3% 0% 100%
LuaFailed
 reverse-complement 
Perl0.040.08?284  11% 0% 0% 88%
LuaFailed
 mandelbrot 
PerlFailed
Lua4.084.104,332623  0% 0% 1% 100%

 4 : Are there other Perl programs for these benchmarks?

Remember - those are just the fastest Perl and Lua programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Perl.

Maybe one of those other Perl programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Perl and Lua 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.

 Perl : server-side shell & cgi scripts 

This is perl 5, version 20, subversion 2 (v5.20.2) built for i686-linux

Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF

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

Download: http://www.cpan.org/src/5.0/

Revised BSD license

  Home   Conclusions   License   Play