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.09 11,104 555 161.08 97% 98% 99% 98%
Python 3 182.12 52,752 443 705.87 96% 96% 96% 100%
reverse-complement
source secs mem gz cpu cpu load
Perl 10.33 1,494,316 287 10.32 0% 0% 1% 100%
Python 3 16.03 1,007,016 814 19.29 18% 59% 44% 23%
k-nucleotide
source secs mem gz cpu cpu load
Perl 59.16 1,068,524 476 185.31 71% 87% 70% 87%
Python 3 72.80 189,720 1967 276.09 95% 96% 98% 94%
regex-redux
source secs mem gz cpu cpu load
Perl 14.84 156,180 820 43.80 96% 64% 49% 88%
Python 3 16.98 445,760 512 31.44 28% 74% 47% 38%
n-body
source secs mem gz cpu cpu load
Perl 746.84 5,532 1429 746.66 71% 0% 1% 29%
Python 3 850.24 7,916 1242 850.06 0% 0% 0% 100%
pidigits
source secs mem gz cpu cpu load
Perl 3.60 7,548 261 3.60 2% 1% 0% 100%
Python 3 3.48 10,352 386 3.47 1% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 539.46 11,100 570 2,155.24 100% 100% 100% 100%
Python 3 507.56 50,988 950 1,998.88 99% 99% 97% 99%
fasta
source secs mem gz cpu cpu load
Perl 90.30 54,352 871 90.04 42% 1% 58% 0%
Python 3 63.19 680,688 1947 135.52 62% 70% 63% 22%
binary-trees
source secs mem gz cpu cpu load
Perl 183.35 2,197,900 648 595.18 66% 74% 93% 92%
Python 3 83.95 451,732 589 290.57 88% 87% 87% 97%
mandelbrot
source secs mem gz cpu cpu load
Perl 677.51 43,260 586 2,707.75 100% 100% 100% 100%
Python 3 263.04 51,780 688 1,050.80 100% 100% 100% 100%
Perl

This is perl 5, version 28, subversion 0 (v5.28.0) built for x86_64-linux-thread-multi

Python 3

Python 3.7.1