The Computer Language
Benchmarks Game

Perl programs versus Python 3

by benchmark task performance

spectral-norm
source secs KB gz cpu cpu load
Perl 181.10 6,836 340 181.04 1% 0% 0% 100%
Python 3 857.31 9,224 328 857.02 1% 1% 0% 100%
reverse-complement
source secs KB gz cpu cpu load
Perl 2.67 376,248 284 2.66 0% 0% 1% 100%
Python 3 4.47 264,580 800 4.45 0% 1% 1% 100%
k-nucleotide
source secs KB gz cpu cpu load
Perl 213.01 534,952 359 209.48 0% 1% 1% 100%
Python 3 284.38 153,732 1937 284.04 0% 1% 1% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Perl 1,857.98 3,324 427 1,857.47 1% 0% 0% 100%
Python 3 2,132.93 56,676 944 2,132.33 1% 1% 1% 100%
fasta
source secs KB gz cpu cpu load
Perl 96.54 52,084 838 96.51 1% 0% 0% 100%
Python 3 110.68 8,148 977 110.64 1% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
Perl 26.47 142,256 527 26.46 0% 1% 0% 100%
Python 3 24.05 317,412 424 24.04 1% 0% 1% 100%
n-body
source secs KB gz cpu cpu load
Perl 1,088.67 3,156 1401 1,088.37 1% 1% 0% 100%
Python 3 938.72 8,112 1228 938.49 0% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Perl 614.00 546,676 448 613.50 0% 1% 1% 100%
Python 3 475.84 850,920 596 475.38 0% 1% 0% 100%
pidigits
source secs KB gz cpu cpu load
Perl 3.38 4,184 261 3.37 0% 1% 2% 100%
Python 3 2.20 10,300 335 2.20 1% 0% 1% 100%
fasta-redux
source secs KB gz cpu cpu load
Perl 0.75 3,156 854 0.75 0% 0% 0% 100%
  No program contribute your program
mandelbrot
source secs KB gz cpu cpu load
Perl   Failed
Python 3 4.63 55,644 686 4.58 1% 0% 1% 99%
Perl

This is perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-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_64_BIT_ALL USE_64_BIT_INT 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, 08:50:08) [GCC 4.9.2] on linux