÷

 Step 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.


 Step 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
 binary-trees1/4±±
 mandelbrot1/21/15±
 fasta±±±
 n-body±±±
 spectral-norm±1/2
 pidigits±±
 reverse-complement±±
 k-nucleotide1/6±
 regex-dna±1/2
 fannkuch1/2±

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

 Step 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
 binary-trees 
Python CPython1,045.71296.77674,488626  85% 85% 86% 97%
Perl1,292.441,292.38643,488541  0% 0% 100% 0%
 mandelbrot 
Python CPython3,115.98779.1818,824425  100% 100% 100% 100%
Perl5,578.831,436.69291,628550  97% 97% 97% 97%
 fasta 
Python CPython234.29234.322,852779  4% 26% 37% 34%
Perl339.78339.762,112934  100% 0% 0% 0%
 n-body 
Python CPython1,508.591,508.522,9401105  100% 0% 0% 0%
Perl1,914.131,914.022,1281140  0% 0% 0% 100%
 spectral-norm 
Python CPython1,150.52296.8820,744428  95% 96% 97% 100%
Perl1,212.30304.617,792846  100% 100% 99% 100%
 pidigits 
Python CPython7.407.405,528476  0% 0% 100% 0%
Perl7.037.033,284385  0% 0% 0% 100%
 reverse-complement 
Python CPython7.647.64538,340288  100% 0% 0% 0%
Perl5.785.79124,036237  0% 0% 0% 100%
 k-nucleotide 
Python CPython415.27144.14439,968520  56% 88% 50% 96%
Perl281.5788.722,774,904648  78% 73% 88% 83%
 regex-dna 
Python CPython29.2229.22191,156342  0% 100% 0% 0%
Perl39.0714.23153,584527  55% 66% 58% 96%
 fannkuch 
Python CPython4,355.804,355.542,812387  100% 0% 0% 0%
Perl4,206.051,062.526,020471  99% 99% 99% 100%
 chameneos-redux 
Python CPython288.54237.533,020869  39% 33% 17% 27%
No Perl

 Measurements for all the accepted programs

 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