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/2±
 fannkuch-redux1/2 ±
 fasta1/2 ±
 regex-dna±1/2±
 n-body± ±
 binary-trees±±
 mandelbrot ±
 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 
Perl183.4747.039,340551  98% 97% 98% 97%
Python 3821.48209.7643,728437  98% 98% 98% 98%
 reverse-complement 
Perl2.902.90374,704284  0% 0% 0% 100%
Python 35.925.941,008,592325  1% 1% 1% 100%
 k-nucleotide 
Perl240.6070.321,886,164648  84% 90% 82% 87%
Python 3374.51124.40498,756647  59% 58% 87% 98%
 fannkuch-redux 
Perl2,112.88531.888,720565  100% 99% 99% 99%
Python 33,587.04915.3640,096797  98% 97% 100% 97%
 fasta 
Perl104.98105.03100,328838  0% 100% 0% 0%
Python 3161.75166.415,576788  25% 27% 16% 34%
 regex-dna 
Perl30.7511.21141,108527  49% 70% 76% 80%
Python 322.9810.42269,120478  40% 48% 83% 55%
 n-body 
Perl1,095.451,095.802,6481401  0% 0% 0% 100%
Python 3939.20939.505,5641181  1% 0% 0% 100%
 binary-trees 
Perl755.68211.701,593,648706  78% 95% 96% 89%
Python 3531.55140.741,123,020626  98% 94% 94% 94%
 mandelbrot 
Perl3,308.66828.0041,196579  100% 100% 100% 100%
Python 31,760.17475.3710,556777  90% 100% 90% 90%
 pidigits 
Perl4.374.384,316261  1% 0% 0% 100%
Python 32.402.416,600256  1% 2% 0% 100%
 fasta-redux 
Perl0.861.062,604854  84% 1% 6% 11%
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 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