/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® quad-core |
Each chart bar shows, for one unidentified benchmark, how much the fastest Perl program used compared to the fastest Python 3 program.
These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.
Each table row shows, for one named benchmark, how much the fastest Perl program used compared to the fastest Python 3 program.
| Perl used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| k-nucleotide | 1/2 | 4× | ± | |
| reverse-complement | 1/2 | 1/2 | ± | |
| fasta | 1/2 | 22× | ± | |
| spectral-norm † | ± | 1/7 | ± | |
| regex-dna | ± | 1/2 | ± | |
| n-body | ± | 1/2 | ± | |
| pidigits | 2× | 1/2 | ± | |
| binary-trees | 2× | ± | ± | |
| mandelbrot | 2× | 12× | ± | |
| fannkuch-redux † | 3× | 1/14 | 1/2 | |
| Perl used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 1/2 | 1/2 | 1/2 | ± | 2× | 3× | 3× |
† possible mismatch - one-core program compared to multi-core program.
± read the measurements and then read the program source code.
These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.
For each named benchmark, measurements of the fastest Perl program are shown for comparison against measurements of the fastest Python 3 program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| k-nucleotide | |||||
| Perl | 242.07 | 69.89 | 1,774,668 | 648 | 82% 88% 85% 92% |
| Python 3 | 489.02 | 161.22 | 422,160 | 647 | 62% 55% 97% 90% |
| reverse-complement | |||||
| Perl | 3.04 | 3.05 | 374,472 | 284 | 0% 1% 1% 100% |
| Python 3 | 6.52 | 6.54 | 601,488 | 325 | 0% 0% 100% 0% |
| fasta | |||||
| Perl | 116.40 | 116.45 | 99,960 | 838 | 0% 94% 0% 7% |
| Python 3 | 246.95 | 249.75 | 4,600 | 788 | 24% 2% 25% 51% |
| spectral-norm | |||||
| Perl | 229.81 | 229.89 | 3,860 | 333 | 96% 0% 0% 4% † |
| Python 3 | 1,062.11 | 268.32 | 27,732 | 437 | 99% 99% 99% 99% † |
| regex-dna | |||||
| Perl | 34.56 | 13.84 | 140,296 | 527 | 36% 77% 59% 78% |
| Python 3 | 25.89 | 12.98 | 235,412 | 478 | 40% 68% 40% 53% |
| n-body | |||||
| Perl | 1,177.82 | 1,178.23 | 2,280 | 1401 | 24% 16% 61% 1% |
| Python 3 | 1,086.65 | 1,086.89 | 4,716 | 1181 | 93% 0% 0% 7% |
| pidigits | |||||
| Perl | 5.46 | 5.47 | 3,600 | 261 | 0% 1% 100% 0% |
| Python 3 | 3.06 | 3.07 | 5,440 | 255 | 1% 0% 0% 100% |
| binary-trees | |||||
| Perl | 863.86 | 258.43 | 912,720 | 706 | 94% 69% 100% 72% |
| Python 3 | 524.47 | 139.16 | 685,880 | 626 | 98% 93% 93% 93% |
| mandelbrot | |||||
| Perl | 3,254.51 | 827.47 | 79,344 | 592 | 99% 98% 99% 98% |
| Python 3 | 1,746.99 | 438.65 | 6,772 | 777 | 100% 100% 100% 100% |
| fannkuch-redux | |||||
| Perl | 2,820.32 | 2,821.21 | 1,752 | 457 | 100% 0% 0% 0% † |
| Python 3 | 4,138.16 | 1,045.69 | 25,128 | 797 | 99% 99% 98% 100% † |
| fasta-redux | |||||
| Perl | 2.13 | 2.13 | 2,276 | 1112 | 0% 100% 1% 0% |
† possible mismatch - one-core program compared to multi-core program.
Remember - those are just the fastest Perl and Python 3 programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Perl.
Maybe one of those other Perl programs is fastest on a different OS/machine.
Remember - those are just the fastest Perl and Python 3 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.
This is perl 5, version 18, subversion 0 (v5.18.0) built for i686-linux-thread-multi
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_ITHREADS
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF USE_REENTRANT_API
Home Page: http://www.perl.org/
Download: http://www.cpan.org/src/5.0/