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 180.01 55,892 437 714.86 99% 100% 99% 100%
fasta
source secs mem gz cpu cpu load
Perl 98.16 53,760 838 98.12 99% 1% 1% 1%
Python 3 113.03 7,860 977 112.99 1% 100% 0% 1%
k-nucleotide
source secs mem gz cpu cpu load
Perl 63.38 1,131,644 648 230.49 92% 90% 95% 89%
Python 3 72.35 229,040 1937 268.72 98% 94% 91% 94%
n-body
source secs mem gz cpu cpu load
Perl 758.94 5,052 1401 758.74 1% 1% 100% 1%
Python 3 836.27 7,756 1181 836.06 0% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.67 378,924 284 2.67 100% 0% 1% 0%
Python 3 2.93 265,636 800 4.28 80% 46% 21% 2%
pidigits
source secs mem gz cpu cpu load
Perl 3.53 6,836 261 3.52 0% 0% 1% 100%
Python 3 3.41 9,992 382 3.40 1% 2% 100% 1%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 525.84 12,832 565 2,063.84 98% 97% 100% 98%
Python 3 501.72 54,708 944 1,967.92 98% 97% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Perl 213.12 1,385,276 706 716.32 97% 72% 96% 72%
Python 3 126.07 831,740 596 474.55 93% 93% 93% 99%
mandelbrot
source secs mem gz cpu cpu load
Perl 772.49 45,540 579 3,085.63 100% 100% 100% 100%
Python 3 250.62 52,752 686 1,000.26 100% 100% 100% 100%
regex-redux
source secs mem gz cpu cpu load
  No program contribute your program
Python 3 1.07 ? 486 ? 5% 75% 17% 13%
Perl

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

Python 3

Python 3.6.0 (default, Feb 5 2017, 10:29:14) [GCC 5.4.0 20160609] on linux
--enable-optimizations
make profile-opt