PLEASE CHOOSE THE UP-TO-DATE MEASUREMENTS INSTEAD OF THESE! (Read the FAQ!) |
Compare the performance of Python CPython programs against some other language implementation.
For more information about the Python implementation we measured see ↓ about Python CPython.
| 1/2 1/3 1/4 Python CPython is better | ||||
|---|---|---|---|---|
| Programs | Time | Memory Use | Source Size | Reduced N |
| spectral-norm | ||||
| chameneos-redux | ||||
| nsieve | 1/4 | 1/3 | ± | |
| binary-trees | 1/2 | 1/2 | ± | |
| regex-dna | 1/2 | ± | ± | |
| fasta | 1/2 | ± | ± | |
| recursive | 1/2 | ± | ± | |
| mandelbrot | 1/2 | ± | ± | |
| fannkuch | ± | ± | ± | |
| n-body | ± | 2 | ± | |
| pidigits | ± | ± | ± | |
| reverse-complement | ± | ± | ± | |
| partial-sums | ± | ± | ± | |
| sum-file | ± | ± | ± | |
| nsieve-bits | ± | 3 | ± | |
| k-nucleotide | 2 | 1/2 | ± | |
± look at the measurements
| Program & Logs | CPU secs | Memory KB | Size B | Elapsed secs | ~ CPU Load |
|---|---|---|---|---|---|
| nsieve | |||||
| Python CPython #2 | 14.53 | 82,412 | 243 | ||
| Perl #2 | 60.70 | 242,316 | 290 | ||
| binary-trees | |||||
| Python CPython #3 | 90.93 | 16,024 | 418 | ||
| Perl | 224.06 | 37,588 | 481 | ||
| regex-dna | |||||
| Python CPython | 7.88 | 19,120 | 342 | ||
| Perl #2 | 13.66 | 25,048 | 449 | ||
| fasta | |||||
| Python CPython #2 | 517.71 | 3,160 | 779 | ||
| Perl #4 | 850.67 | 3,156 | 934 | ||
| recursive | |||||
| Python CPython | 621.97 | 14,896 | 360 | ||
| Perl #2 | 956.31 | 10,812 | 380 | ||
| mandelbrot | |||||
| Python CPython #3 | 251.14 | 3,388 | 303 | ||
| Perl #2 | 382.65 | 3,388 | 311 | ||
| fannkuch | |||||
| Python CPython #2 | 593.14 | 3,148 | 387 | ||
| Perl | 728.50 | 3,144 | 348 | ||
| n-body | |||||
| Python CPython #2 | 1,348.84 | 3,140 | 1027 | ||
| Perl | 1,567.73 | 1,904 | 1140 | ||
| pidigits | |||||
| Python CPython #3 | 5.34 | 3,348 | 476 | ||
| Perl #2 | 6.21 | 3,144 | 385 | ||
| reverse-complement | |||||
| Python CPython #3 | 2.30 | 46,180 | 288 | ||
| Perl #2 | 1.99 | 38,356 | 298 | ||
| partial-sums | |||||
| Python CPython | 18.14 | 3,168 | 395 | ||
| Perl #3 | 14.23 | 3,156 | 389 | ||
| sum-file | |||||
| Python CPython | 19.88 | 14,924 | 77 | ||
| Perl | 15.55 | 14,916 | 84 | ||
| nsieve-bits | |||||
| Python CPython #2 | 126.15 | 12,416 | 336 | ||
| Perl | 93.55 | 4,024 | 253 | ||
| k-nucleotide | |||||
| Python CPython | 49.68 | 25,220 | 475 | ||
| Perl #2 | 27.54 | 42,836 | 359 | ||
Python 2.5.2
Online book: Dive Into Python
Home Page: http://www.python.org/
Download: http://www.python.org/download/