/mobile Handheld Friendly website

÷

 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.


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.

 Perl used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide1/2±
 reverse-complement1/21/2±
 fasta1/222×±
 spectral-norm †±1/7±
 regex-dna±1/2±
 n-body±1/2±
 pidigits1/2±
 binary-trees±±
 mandelbrot12×±
 fannkuch-redux †1/141/2
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/21/2±

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

± 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
 k-nucleotide 
Perl242.0769.891,774,668648  82% 88% 85% 92%
Python 3489.02161.22422,160647  62% 55% 97% 90%
 reverse-complement 
Perl3.043.05374,472284  0% 1% 1% 100%
Python 36.526.54601,488325  0% 0% 100% 0%
 fasta 
Perl116.40116.4599,960838  0% 94% 0% 7%
Python 3246.95249.754,600788  24% 2% 25% 51%
 spectral-norm 
Perl229.81229.893,860333  96% 0% 0% 4% †
Python 31,062.11268.3227,732437  99% 99% 99% 99% †
 regex-dna 
Perl34.5613.84140,296527  36% 77% 59% 78%
Python 325.8912.98235,412478  40% 68% 40% 53%
 n-body 
Perl1,177.821,178.232,2801401  24% 16% 61% 1%
Python 31,086.651,086.894,7161181  93% 0% 0% 7%
 pidigits 
Perl5.465.473,600261  0% 1% 100% 0%
Python 33.063.075,440255  1% 0% 0% 100%
 binary-trees 
Perl863.86258.43912,720706  94% 69% 100% 72%
Python 3524.47139.16685,880626  98% 93% 93% 93%
 mandelbrot 
Perl3,254.51827.4779,344592  99% 98% 99% 98%
Python 31,746.99438.656,772777  100% 100% 100% 100%
 fannkuch-redux 
Perl2,820.322,821.211,752457  100% 0% 0% 0% †
Python 34,138.161,045.6925,128797  99% 99% 98% 100% †
 fasta-redux 
Perl2.132.132,2761112  0% 100% 1% 0%
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 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