The Computer Language
Benchmarks Game

PHP programs versus Python 3

by benchmark task performance

spectral-norm
source secs KB gz cpu cpu load
PHP 41.23 17,104 1135 163.58 99% 99% 100% 99%
Python 3 250.12 58,892 437 932.41 94% 95% 92% 93%
regex-dna
source secs KB gz cpu cpu load
PHP 2.23 106,284 832 5.09 62% 78% 49% 42%
Python 3 10.58 266,312 478 23.44 49% 39% 68% 68%
mandelbrot
source secs KB gz cpu cpu load
PHP 134.34 132,880 863 536.04 100% 100% 100% 100%
Python 3 293.92 55,392 686 1,171.64 100% 100% 100% 100%
n-body
source secs KB gz cpu cpu load
PHP 432.48 7,928 1082 432.36 0% 100% 0% 1%
Python 3 923.74 8,040 1181 923.49 44% 13% 0% 44%
fasta
source secs KB gz cpu cpu load
PHP 59.28 7,936 1030 59.26 1% 0% 1% 100%
Python 3 111.44 8,276 977 111.40 28% 0% 0% 73%
fannkuch-redux
source secs KB gz cpu cpu load
PHP 321.58 29,140 1150 1,280.13 100% 100% 99% 100%
Python 3 567.35 55,368 944 2,220.71 98% 96% 100% 99%
k-nucleotide
source secs KB gz cpu cpu load
PHP 44.55 135,472 1060 152.16 81% 92% 76% 93%
Python 3 76.50 162,004 1937 297.12 97% 97% 97% 99%
pidigits
source secs KB gz cpu cpu load
PHP 2.19 8,852 394 2.18 100% 1% 0% 2%
Python 3 2.20 10,248 335 2.20 1% 0% 0% 100%
binary-trees
source secs KB gz cpu cpu load
PHP 175.09 1,550,168 483 174.93 98% 4% 1% 0%
Python 3 152.06 804,624 596 516.24 94% 92% 95% 91%
reverse-complement
source secs KB gz cpu cpu load
PHP 4.02 336,164 297 4.01 2% 0% 100% 0%
Python 3 3.11 266,972 800 4.56 20% 99% 2% 29%
fasta-redux
source secs KB gz cpu cpu load
PHP 0.45 7,872 1110 0.45 0% 2% 0% 100%
  No program contribute your program
PHP

PHP 7.0.6 (cli) (built: May 4 2016 16:00:18) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

Python 3

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