The Computer Language
Benchmarks Game

Perl programs versus Python 3

by benchmark task performance

spectral-norm
secs KB gz cpu cpu load
Perl 183.06 5,292 340 183.01 1% 0% 1% 100%
Python 3 1,105.41 7,120 328 1,105.02 1% 0% 0% 100%
reverse-complement
secs KB gz cpu cpu load
Perl 2.79 358,204 284 2.78 3% 1% 1% 100%
Python 3 5.54 262,360 800 5.53 1% 1% 1% 100%
k-nucleotide
secs KB gz cpu cpu load
Perl 214.42 465,444 359 211.38 0% 1% 1% 100%
Python 3 317.42 219,028 1937 317.16 0% 1% 1% 100%
fannkuch-redux
secs KB gz cpu cpu load
Perl 1,868.61 2,968 427 1,868.00 1% 0% 0% 100%
Python 3 2,464.08 44,564 944 2,463.20 1% 0% 0% 100%
fasta
secs KB gz cpu cpu load
Perl 99.72 51,388 838 99.68 1% 0% 0% 100%
Python 3 122.25 6,508 977 122.19 1% 1% 1% 100%
regex-dna
secs KB gz cpu cpu load
Perl 25.60 139,096 527 25.57 0% 1% 1% 100%
Python 3 25.11 249,088 478 24.98 1% 0% 1% 100%
n-body
secs KB gz cpu cpu load
Perl 1,159.26 2,264 1401 1,158.93 0% 1% 1% 100%
Python 3 1,024.87 6,324 1228 1,024.54 1% 0% 1% 100%
binary-trees
secs KB gz cpu cpu load
Perl 590.05 330,760 448 589.65 1% 1% 0% 100%
Python 3 497.80 482,656 596 497.40 1% 1% 1% 100%
pidigits
secs KB gz cpu cpu load
Perl 4.35 3,360 261 4.34 1% 0% 1% 100%
Python 3 2.74 8,468 335 2.73 0% 1% 1% 100%
fasta-redux
secs KB gz cpu cpu load
Perl 0.83 2,528 854 0.81 1% 0% 0% 99%
  No program contribute your program
mandelbrot
secs KB gz cpu cpu load
Perl   Failed
Python 3 5.31 44,896 686 5.28 1% 0% 1% 100%
Perl

This is perl 5, version 20, subversion 2 (v5.20.2) built for i686-linux

Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF

Python 3

Python 3.5.0 (default, Sep 14 2015, 09:36:50) [GCC 4.9.2] on linux