/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
 fasta1/216×±
 reverse-complement1/21/2±
 k-nucleotide1/2±
 regex-dna±1/2±
 spectral-norm †±1/7±
 n-body±1/2±
 binary-trees±±±
 mandelbrot±±
 pidigits1/2±
 fannkuch-redux †1/191/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
 fasta 
Perl104.98105.03100,328838  0% 100% 0% 0%
Python 3219.23222.966,208788  31% 26% 3% 41%
 reverse-complement 
Perl2.902.90374,704284  0% 0% 0% 100%
Python 35.375.38679,776325  0% 0% 100% 0%
 k-nucleotide 
Perl240.6070.321,886,164648  84% 90% 82% 87%
Python 3384.41129.56451,488647  60% 98% 58% 81%
 regex-dna 
Perl30.7511.21141,108527  49% 70% 76% 80%
Python 326.3412.88255,724478  41% 33% 99% 32%
 spectral-norm 
Perl200.90200.975,516333  0% 0% 0% 100% †
Python 3804.62202.5439,668437  99% 99% 100% 99% †
 n-body 
Perl1,095.451,095.802,6481401  0% 0% 0% 100%
Python 3934.69935.016,2921181  8% 74% 18% 0%
 binary-trees 
Perl755.68211.701,593,648706  78% 95% 96% 89%
Python 3539.48142.511,209,460626  93% 95% 98% 93%
 mandelbrot 
Perl3,071.49799.01147,540592  96% 97% 95% 97%
Python 31,779.60446.24180,408777  100% 100% 100% 100%
 pidigits 
Perl4.374.384,316261  1% 0% 0% 100%
Python 32.402.406,972255  0% 0% 100% 1%
 fannkuch-redux 
Perl2,615.572,616.451,864457  0% 0% 0% 100% †
Python 33,556.66900.6036,288797  99% 100% 97% 99% †
 fasta-redux 
Perl1.811.812,9121112  0% 1% 0% 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 18, subversion 0 (v5.18.0) built for x86_64-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_64_BIT_ALL
                        USE_64_BIT_INT 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