The Computer Language
Benchmarks Game

Perl versus Python 3 fastest programs

by faster benchmark performance

spectral-norm
source secs mem gz cpu cpu load
Perl 41.83 10,980 555 165.14 99% 99% 99% 98%
Python 3 193.86 50,556 443 757.23 98% 98% 99% 99%
reverse-complement
source secs mem gz cpu cpu load
Perl 10.61 1,493,876 287 10.59 0% 1% 100% 0%
Python 3 16.76 1,005,252 814 20.08 65% 21% 44% 17%
k-nucleotide
source secs mem gz cpu cpu load
Perl 64.22 1,068,544 476 215.42 78% 78% 83% 97%
Python 3 79.79 250,948 1967 309.42 98% 96% 96% 99%
n-body
source secs mem gz cpu cpu load
Perl 710.66 5,244 1429 710.51 0% 1% 0% 100%
Python 3 882.00 8,212 1196 881.81 91% 0% 1% 9%
regex-redux
source secs mem gz cpu cpu load
Perl 14.66 155,708 820 43.59 63% 86% 53% 96%
Python 3 15.56 439,964 512 27.97 25% 92% 32% 32%
pidigits
source secs mem gz cpu cpu load
Perl 3.50 7,348 261 3.50 100% 1% 1% 1%
Python 3 3.51 10,500 386 3.50 1% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 570.21 11,260 570 2,198.55 96% 99% 95% 97%
Python 3 547.23 48,052 950 2,162.70 99% 100% 97% 100%
fasta
source secs mem gz cpu cpu load
Perl 99.64 54,044 871 99.61 0% 1% 0% 100%
Python 3 62.88 680,736 1947 141.15 60% 56% 48% 62%
binary-trees
source secs mem gz cpu cpu load
Perl 179.61 2,215,420 648 593.20 94% 91% 71% 75%
Python 3 92.72 448,844 589 333.42 87% 90% 96% 87%
mandelbrot
source secs mem gz cpu cpu load
Perl 729.09 42,964 586 2,912.27 100% 100% 100% 100%
Python 3 279.68 49,344 688 1,117.29 100% 100% 100% 100%
Perl

This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-gnu-thread-multi

Python 3

Python 3.7.0