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 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 : 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 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 ±
 reverse-complement †±±1/3
 k-nucleotide±1/3
 fannkuch-redux± 1/2
 regex-dna±1/2±
 n-body± ±
 pidigits ±
 binary-trees±
 fasta † 1/2
 mandelbrot ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/51/5±±

† possible mismatch - one-core program compared to multi-core program.

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
Perl211.8054.416,644551  97% 98% 96% 98%
Python 31,004.46252.9230,320437  99% 100% 99% 99%
 reverse-complement 
Perl2.932.94375,804284  1% 1% 0% 100% †
Python 35.453.72259,780800  30% 1% 72% 47% †
 k-nucleotide 
Perl240.8465.841,012,832648  90% 93% 93% 91%
Python 3291.9475.78148,1921937  97% 97% 100% 97%
 fannkuch-redux 
Perl2,380.95598.6212,380565  100% 100% 99% 99%
Python 32,582.98654.6128,068944  100% 99% 98% 98%
 regex-dna 
Perl27.6210.63142,432527  77% 61% 80% 44%
Python 323.4910.58253,208478  47% 39% 94% 43%
 n-body 
Perl1,229.651,230.002,5521401  1% 0% 0% 100%
Python 3984.24984.536,0801228  6% 100% 2% 7%
 pidigits 
Perl4.494.503,684261  1% 0% 1% 100%
Python 32.742.745,400335  0% 1% 100% 0%
 binary-trees 
Perl895.62268.791,018,156706  90% 95% 73% 76%
Python 3470.42125.06470,428596  93% 97% 94% 94%
 fasta 
Perl113.68113.7251,420838  1% 0% 0% 100% †
Python 3127.5445.962,479,9041933  76% 65% 78% 80% †
 mandelbrot 
Perl3,720.50931.4844,184579  100% 100% 100% 100%
Python 31,106.61277.2728,372686  100% 100% 100% 100%
 fasta-redux 
Perl0.900.922,704854  6% 1% 2% 100%
No program

† possible mismatch - one-core program compared to multi-core 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 20, subversion 2 (v5.20.2) 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_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        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