The Computer Language
Benchmarks Game

PHP programs versus Python 3

by benchmark task performance

k-nucleotide
secs KB gz cpu cpu load
PHP 41.35 247,852 1036 41.33 1% 0% 0% 100%
Python 3 284.38 153,732 1937 284.04 0% 1% 1% 100%
spectral-norm
secs KB gz cpu cpu load
PHP 471.36 7,284 397 471.23 1% 0% 0% 100%
Python 3 857.31 9,224 328 857.02 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
PHP 657.95 3,364 1082 657.77 1% 0% 0% 100%
Python 3 938.72 8,112 1228 938.49 0% 1% 1% 100%
pidigits
secs KB gz cpu cpu load
PHP 2.23 4,100 394 2.23 1% 0% 0% 100%
Python 3 2.20 10,300 335 2.20 1% 0% 1% 100%
fasta
secs KB gz cpu cpu load
PHP 116.38 3,364 1030 116.35 0% 0% 1% 100%
Python 3 110.68 8,148 977 110.64 1% 1% 1% 100%
mandelbrot
secs KB gz cpu cpu load
PHP 1,219.42 4,256 443 1,219.07 1% 1% 1% 100%
Python 3 1,072.06 55,872 686 1,071.62 0% 1% 1% 100%
regex-dna
secs KB gz cpu cpu load
PHP 27.36 217,384 459 27.35 1% 1% 0% 100%
Python 3 24.05 317,412 424 24.04 1% 0% 1% 100%
fannkuch-redux
secs KB gz cpu cpu load
PHP 2,611.99 3,296 441 2,611.29 1% 1% 0% 100%
Python 3 2,132.93 56,676 944 2,132.33 1% 1% 1% 100%
binary-trees
secs KB gz cpu cpu load
PHP 612.27 1,021,788 472 611.49 1% 1% 0% 100%
Python 3 475.84 850,920 596 475.38 0% 1% 0% 100%
reverse-complement
secs KB gz cpu cpu load
PHP 5.83 444,352 262 5.82 1% 1% 1% 100%
Python 3 4.47 264,580 800 4.45 0% 1% 1% 100%
fasta-redux
secs KB gz cpu cpu load
PHP 0.65 3,372 1110 0.64 0% 2% 0% 100%
  No program contribute your program
PHP

PHP 5.6.7 (cli) (built: Mar 25 2015 15:05:06)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

Python 3

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