The Computer Language
Benchmarks Game

Perl programs versus Python 3

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Perl 41.83 10,980 555 165.14 99% 99% 99% 98%
Python 3 180.97 15,876 443 720.51 100% 100% 100% 100%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.48 377,192 287 2.48 1% 0% 0% 100%
Python 3 3.26 264,596 814 4.67 18% 99% 1% 26%
k-nucleotide
source secs mem gz cpu cpu load
Perl 64.22 1,068,544 476 215.42 78% 78% 83% 97%
Python 3 77.65 182,700 1967 302.86 97% 99% 97% 98%
n-body
source secs mem gz cpu cpu load
Perl 710.66 5,244 1429 710.51 0% 1% 0% 100%
Python 3 838.39 10,324 1196 838.20 95% 1% 5% 0%
regex-redux
source secs mem gz cpu cpu load
Perl 14.66 155,708 820 43.59 63% 86% 53% 96%
Python 3 15.22 447,324 512 27.44 25% 33% 32% 91%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 570.21 11,260 570 2,198.55 96% 99% 95% 97%
Python 3 565.97 15,528 950 2,172.63 95% 94% 95% 100%
pidigits
source secs mem gz cpu cpu load
Perl 3.50 7,348 261 3.50 100% 1% 1% 1%
Python 3 3.43 12,716 386 3.43 100% 1% 1% 0%
fasta
source secs mem gz cpu cpu load
Perl 99.64 54,044 871 99.61 0% 1% 0% 100%
Python 3 59.47 15,996 1947 138.97 55% 55% 63% 66%
binary-trees
source secs mem gz cpu cpu load
Perl 183.13 2,199,432 648 609.32 83% 93% 77% 81%
Python 3 93.55 280,624 589 337.74 92% 89% 87% 93%
mandelbrot
source secs mem gz cpu cpu load
Perl 729.09 42,964 586 2,912.27 100% 100% 100% 100%
Python 3 225.24 15,736 688 899.25 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.6.3