The Computer Language
Benchmarks Game

PHP programs versus Python 3

by benchmark task performance

spectral-norm
secs KB gz cpu cpu load
PHP 44.45 21,584 1135 177.28 100% 100% 100% 100%
Python 3 250.12 58,892 437 932.41 94% 95% 92% 93%
regex-dna
secs KB gz cpu cpu load
PHP 2.22 107,036 832 5.10 47% 33% 100% 53%
Python 3 10.58 266,312 478 23.44 49% 39% 68% 68%
k-nucleotide
secs KB gz cpu cpu load
PHP 21.76 230,448 1036 24.34 4% 91% 3% 15%
Python 3 76.50 162,004 1937 297.12 97% 97% 97% 99%
n-body
secs KB gz cpu cpu load
PHP 413.16 7,776 1082 413.04 49% 5% 42% 6%
Python 3 923.74 8,040 1181 923.49 44% 13% 0% 44%
mandelbrot
secs KB gz cpu cpu load
PHP 141.60 131,984 863 563.41 100% 100% 100% 100%
Python 3 293.92 55,392 686 1,171.64 100% 100% 100% 100%
fannkuch-redux
secs KB gz cpu cpu load
PHP 300.80 29,196 1150 1,198.95 100% 100% 100% 100%
Python 3 567.35 55,368 944 2,220.71 98% 96% 100% 99%
fasta
secs KB gz cpu cpu load
PHP 61.40 7,840 1030 61.38 0% 100% 0% 1%
Python 3 111.44 8,276 977 111.40 28% 0% 0% 73%
pidigits
secs KB gz cpu cpu load
PHP 2.18 8,780 394 2.18 0% 3% 100% 0%
Python 3 2.20 10,248 335 2.20 1% 0% 0% 100%
binary-trees
secs KB gz cpu cpu load
PHP 168.15 1,549,916 483 168.01 38% 30% 1% 34%
Python 3 152.06 804,624 596 516.24 94% 92% 95% 91%
reverse-complement
secs KB gz cpu cpu load
PHP 4.23 368,916 297 4.22 100% 1% 0% 0%
Python 3 3.11 266,972 800 4.56 20% 99% 2% 29%
fasta-redux
secs KB gz cpu cpu load
PHP 0.48 7,756 1110 0.48 0% 0% 100% 2%
  No program contribute your program
PHP

PHP 7.0.0 (cli) (built: Dec 3 2015 12:50:26) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.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