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

Each chart bar shows, for one unidentified benchmark, how much the fastest Perl program used compared to the fastest Python 3 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 : Are the Perl programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Perl program used compared to the fastest Python 3 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/5 ±
 k-nucleotide1/2±
 reverse-complement1/21/2±
 fasta1/2 ±
 fannkuch-redux1/2 ±
 n-body± ±
 regex-dna±1/2±
 pidigits ±
 binary-trees±±
 mandelbrot ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/51/51/2±

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

 3 : Are the Perl programs faster? Measurements.

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 Python 3 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
Perl212.5754.356,780551  97% 98% 98% 99%
Python 31,026.66258.4230,260437  99% 99% 99% 99%
 k-nucleotide 
Perl242.0769.891,774,668648  82% 88% 85% 92%
Python 3488.50161.33364,488647  89% 60% 98% 56%
 reverse-complement 
Perl3.043.05374,472284  0% 1% 1% 100%
Python 36.536.55781,144325  0% 1% 0% 100%
 fasta 
Perl116.40116.4599,960838  0% 94% 0% 7%
Python 3241.56246.324,324788  30% 24% 15% 33%
 fannkuch-redux 
Perl2,489.00624.266,292565  100% 100% 99% 100%
Python 34,000.061,012.0627,840797  99% 99% 98% 100%
 n-body 
Perl1,177.821,178.232,2801401  24% 16% 61% 1%
Python 3984.27984.534,2521181  0% 100% 0% 0%
 regex-dna 
Perl34.5613.84140,296527  36% 77% 59% 78%
Python 323.8111.01248,260478  37% 72% 45% 64%
 pidigits 
Perl5.465.473,600261  0% 1% 100% 0%
Python 33.053.065,332256  1% 1% 0% 100%
 binary-trees 
Perl863.86258.43912,720706  94% 69% 100% 72%
Python 3526.56139.26688,512626  93% 96% 96% 94%
 mandelbrot 
Perl3,708.99928.3637,660579  100% 100% 100% 100%
Python 31,837.41483.667,488777  100% 94% 93% 94%
 fasta-redux 
Perl0.901.082,240854  15% 88% 7% 8%
No program

 4 : Are there other Perl programs for these benchmarks?

Remember - those are just the fastest Perl and Python 3 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 Python 3 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 18, subversion 0 (v5.18.0) built for i686-linux-thread-multi

Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_ITHREADS
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF USE_REENTRANT_API

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

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

Revised BSD license

  Home   Conclusions   License   Play