÷

 1 : Are the Python CPython programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used.

Each chart bar shows, for one unidentified benchmark, how much the fastest Python CPython program used compared to the fastest Perl program.


 2 : Are the Python CPython programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used.

Each table row shows, for one named benchmark, how much the fastest Python CPython program used compared to the fastest Perl program.

 Python CPython used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 mandelbrot1/6±
 binary-trees1/3±±
 fasta1/2±±
 n-body±±±
 spectral-norm±1/2
 pidigits±±
 reverse-complement±±±
 k-nucleotide±1/6±
 regex-dna±1/2
 fannkuch1/2±

± read the measurements and then read the program source code.

 3 : Are the Python CPython programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.

For each named benchmark, measurements of the fastest Python CPython program are shown for comparison against measurements of the fastest Perl program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 mandelbrot 
Python CPython2,721.37681.4024,444425  100% 100% 100% 100%
Perl4,226.424,226.214,136311  0% 0% 100% 0%
 binary-trees 
Python CPython1,320.18378.041,373,400626  96% 85% 85% 84%
Perl1,276.891,276.851,091,276541  0% 0% 100% 0%
 fasta 
Python CPython167.44167.513,640779  44% 29% 28% 1%
Perl314.46314.462,548934  100% 0% 0% 0%
 n-body 
Python CPython1,194.461,194.393,8321105  100% 0% 0% 0%
Perl1,665.131,665.142,5681140  0% 0% 100% 0%
 spectral-norm 
Python CPython868.17218.6928,068428  99% 99% 99% 99%
Perl1,137.10285.5510,976846  100% 100% 100% 100%
 pidigits 
Python CPython7.167.176,508476  100% 0% 0% 0%
Perl7.467.463,868385  100% 0% 0% 0%
 reverse-complement 
Python CPython6.286.28565,856288  0% 0% 0% 100%
Perl5.255.25431,496298  100% 0% 0% 0%
 k-nucleotide 
Python CPython320.22114.57489,420520  48% 47% 92% 89%
Perl256.1578.582,883,780648  81% 71% 88% 84%
 regex-dna 
Python CPython26.8526.85203,644342  100% 0% 0% 0%
Perl38.6112.84167,208527  78% 66% 76% 81%
 fannkuch 
Python CPython3,348.333,348.153,580387  0% 0% 100% 0%
Perl3,749.89942.908,808471  99% 100% 100% 100%
 chameneos-redux 
Python CPython286.54216.633,816869  49% 24% 28% 22%
No Perl

 Python CPython : uncluttered imperative programming plus objects 

Python 2.6.3

Online book: Dive Into Python

Home Page: http://www.python.org/

Download: http://www.python.org/download/

Revised BSD license