÷

 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
 nsieve1/31/3±
 binary-trees1/31/3±
 regex-dna1/2±±
 pidigits1/2±±
 fasta±±±
 recursive±±±
 mandelbrot±±±
 fannkuch±±
 sum-file±±
 n-body±±±
 reverse-complement±±±
 nsieve-bits±±
 partial-sums±
 k-nucleotide1/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
 nsieve 
Python CPython8.5735,220246  
Perl25.45121,904290  
 binary-trees 
Python CPython93.4116,116418  
Perl239.3647,936541  
 regex-dna 
Python CPython6.0420,516342  
Perl11.8121,408431  
 pidigits 
Python CPython2.062,928476  
Perl3.612,532385  
 fasta 
Python CPython692.042,420779  
Perl950.041,872934  
 recursive 
Python CPython683.7414,296360  
Perl898.7810,836380  
 mandelbrot 
Python CPython323.702,420303  
Perl403.201,724311  
 fannkuch 
Python CPython772.842,404411  
Perl855.721,492348  
 sum-file 
Python CPython20.752,44477  
Perl18.171,46884  
 n-body 
Python CPython2,015.782,4401027  
Perl1,697.591,9361140  
 reverse-complement 
Python CPython2.7349,072288  
Perl1.9938,360298  
 nsieve-bits 
Python CPython144.4012,436288  
Perl100.184,004253  
 partial-sums 
Python CPython27.412,476395  
Perl17.411,476389  
 k-nucleotide 
Python CPython58.4525,208475  
Perl32.0742,816359  
 chameneos-redux 
Python CPython275.842,576866  
No Perl
 spectral-norm
   No program

 Measurements for all the accepted programs

 Python CPython : uncluttered imperative programming plus objects 

Python 2.5.1

Online book: Dive Into Python

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

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

Revised BSD license