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.10 10,800 551 156.09 98% 94% 94% 94%
Python 3 188.83 54,524 437 750.46 99% 100% 100% 99%
k-nucleotide
source secs mem gz cpu cpu load
Perl 63.38 1,131,644 648 230.49 92% 90% 95% 89%
Python 3 84.73 221,028 1937 276.97 97% 93% 91% 91%
fasta
source secs mem gz cpu cpu load
Perl 98.16 53,760 838 98.12 99% 1% 1% 1%
Python 3 110.91 8,024 977 110.87 100% 1% 1% 1%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.67 378,924 284 2.67 100% 0% 1% 0%
Python 3 2.82 265,428 800 4.18 46% 32% 20% 54%
regex-redux
source secs mem gz cpu cpu load
Perl 14.13 156,872 804 43.42 72% 89% 52% 95%
Python 3 14.86 439,208 486 27.92 46% 77% 35% 31%
n-body
source secs mem gz cpu cpu load
Perl 758.94 5,052 1401 758.74 1% 1% 100% 1%
Python 3 787.02 7,744 1181 786.82 0% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 525.84 12,832 565 2,063.84 98% 97% 100% 98%
Python 3 483.79 51,896 944 1,880.10 97% 94% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Perl 197.93 2,133,108 641 646.04 68% 71% 92% 96%
Python 3 86.90 451,548 581 306.31 89% 97% 87% 89%
mandelbrot
source secs mem gz cpu cpu load
Perl 772.49 45,540 579 3,085.63 100% 100% 100% 100%
Python 3 273.43 53,416 686 1,091.35 100% 100% 100% 100%
pidigits
source secs mem gz cpu cpu load
Perl 0.27 1,152 261 0.27 0% 11% 93% 4%
Python 3   Failed
Perl

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

Python 3

Python 3.6.1 (default, Apr 18 2017, 10:33:41)
[GCC 6.3.0 20170406]
--enable-optimizations --with-lto
make profile-opt