OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each chart bar shows, for one unidentified benchmark, how much the fastest Python CPython program used compared to the fastest Perl program.
This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
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 | |
| pidigits | 1/7 | ± | ± | |
| binary-trees | 1/4 | 1/3 | ± | |
| nsieve | 1/3 | 1/3 | ± | |
| mandelbrot | 1/3 | 19× | ± | |
| partial-sums | 1/2 | 9× | ± | |
| recursive | 1/2 | ± | ± | |
| spectral-norm | ± | ± | ± | |
| fasta | ± | ± | ± | |
| fannkuch | ± | 2× | ± | |
| n-body | ± | ± | ± | |
| reverse-complement | ± | ± | ± | |
| nsieve-bits | ± | 2× | ± | |
| k-nucleotide | 2× | 1/2 | ± | |
| regex-dna | 2× | ± | 1/2 | |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.
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 |
|---|---|---|---|---|---|
| pidigits | |||||
| Python CPython | 0.08 | 2,164 | 257 | ||
| Perl | 0.54 | 2,404 | 385 | ||
| binary-trees | |||||
| Python CPython | 66.96 | 16,172 | 377 | ||
| Perl | 239.36 | 47,936 | 541 | ||
| nsieve | |||||
| Python CPython | 7.35 | 42,400 | 278 | ||
| Perl | 25.45 | 121,904 | 290 | ||
| mandelbrot | |||||
| Python CPython | 5.59 | 29,632 | 312 | ||
| Perl | 15.93 | 1,532 | 311 | ||
| partial-sums | |||||
| Python CPython | 7.03 | 12,680 | 482 | ||
| Perl | 17.41 | 1,476 | 389 | ||
| recursive | |||||
| Python CPython | 22.37 | 3,048 | 360 | ||
| Perl | 36.28 | 2,080 | 380 | ||
| spectral-norm | |||||
| Python CPython | 3,261.32 | 2,900 | 282 | ||
| Perl | 4,089.08 | 2,468 | 334 | ||
| fasta | |||||
| Python CPython | 692.04 | 2,420 | 779 | ||
| Perl | 773.42 | 1,856 | 791 | ||
| fannkuch | |||||
| Python CPython | 5.38 | 2,404 | 411 | ||
| Perl | 5.81 | 1,492 | 348 | ||
| n-body | |||||
| Python CPython | 2,015.78 | 2,440 | 1027 | ||
| Perl | 1,697.59 | 1,936 | 1140 | ||
| reverse-complement | |||||
| Python CPython | 2.73 | 49,072 | 288 | ||
| Perl | 1.99 | 38,360 | 298 | ||
| nsieve-bits | |||||
| Python CPython | 34.97 | 4,936 | 288 | ||
| Perl | 24.21 | 2,132 | 253 | ||
| k-nucleotide | |||||
| Python CPython | 58.45 | 25,208 | 475 | ||
| Perl | 32.07 | 42,816 | 359 | ||
| regex-dna | |||||
| Python CPython | 2.88 | 23,000 | 314 | ||
| Perl | 1.23 | 22,120 | 471 | ||
| chameneos-redux | |||||
| Python CPython | 2.73 | 2,580 | 866 | ||
Remember - those are just the fastest Python CPython and Perl programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Python CPython.
Maybe one of those other Python CPython programs is fastest on a different OS/machine.
Remember - those are just the fastest Python CPython and Perl 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.
Python 2.5.1
Online book: Dive Into Python
Home Page: http://www.python.org/
Download: http://www.python.org/download/