vs

 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/4 ±
 reverse-complement1/21/3±
 k-nucleotide1/21/2
 fasta1/2 ±
 fannkuch-redux± ±
 n-body± ±
 binary-trees±1/2±
 regex-dna±1/2±
 pidigits ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/41/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 
Perl192.71192.785,372333  0% 0% 0% 100%
Python 3746.94747.206,468328  1% 0% 0% 100%
 reverse-complement 
Perl2.902.91374,548284  0% 0% 0% 100%
Python 35.986.001,008,592325  0% 1% 1% 100%
 k-nucleotide 
Perl212.24215.90778,052359  0% 0% 0% 100%
Python 3372.03374.89456,532647  0% 1% 1% 100%
 fasta 
Perl96.4396.46100,036838  0% 0% 0% 100%
Python 3156.10160.135,572792  1% 0% 0% 100%
 fannkuch-redux 
Perl2,287.422,288.171,836457  0% 0% 0% 100%
Python 32,333.002,333.785,416385  1% 0% 0% 100%
 n-body 
Perl1,038.341,038.682,6201401  0% 0% 0% 100%
Python 3932.49932.795,5721181  1% 0% 0% 100%
 binary-trees 
Perl585.86586.36480,396448  0% 0% 0% 100%
Python 3479.82480.361,123,040626  0% 1% 1% 100%
 regex-dna 
Perl30.6930.72139,344527  0% 0% 0% 100%
Python 323.0823.19257,976478  0% 1% 1% 100%
 pidigits 
Perl4.294.304,100261  0% 0% 0% 100%
Python 32.392.396,612256  2% 0% 1% 100%
 fasta-redux 
Perl0.811.022,580854  2% 0% 1% 100%
No program
 mandelbrot 
PerlFailed
Python 37.537.54132,164777  1% 0% 1% 100%

 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

Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
                        USE_64_BIT_INT 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