The Computer Language
Benchmarks Game

PHP versus Node js fastest programs

by faster benchmark performance

regex-redux
source secs mem gz cpu cpu load
PHP 2.61 270,552 816 2.44 79% 40% 40% 42%
Node js 12.05 854,584 408 12.87 29% 47% 21% 12%
k-nucleotide
source secs mem gz cpu cpu load
PHP 41.29 250,628 1079 134.20 74% 78% 90% 90%
Node js 64.56 1,819,728 935 137.90 69% 74% 92% 76%
reverse-complement
source secs mem gz cpu cpu load
PHP 12.54 513,344 438 7.51 59% 6% 61% 28%
Node js 16.61 708,876 1103 18.16 11% 54% 14% 31%
spectral-norm
source secs mem gz cpu cpu load
PHP 38.56 20,848 1152 153.24 99% 100% 99% 99%
Node js 15.81 31,780 381 15.81 2% 100% 1% 2%
binary-trees
source secs mem gz cpu cpu load
PHP 58.93 765,500 868 214.32 90% 98% 92% 90%
Node js 23.87 355,268 431 39.40 36% 30% 72% 35%
fannkuch-redux
source secs mem gz cpu cpu load
PHP 227.59 35,536 1160 906.63 100% 99% 99% 100%
Node js 80.97 30,924 473 80.95 0% 100% 1% 0%
fasta
source secs mem gz cpu cpu load
PHP 56.22 9,632 1062 56.20 2% 100% 0% 1%
Node js 9.15 37,052 1785 9.20 27% 0% 1% 74%
mandelbrot
source secs mem gz cpu cpu load
PHP 118.28 139,504 875 472.05 100% 100% 100% 100%
Node js 18.21 605,668 748 65.22 84% 82% 96% 97%
n-body
source secs mem gz cpu cpu load
PHP 333.78 9,400 1082 333.70 44% 30% 1% 27%
Node js 26.31 33,476 1297 26.30 0% 0% 1% 100%
pidigits
source secs mem gz cpu cpu load
PHP 0.47 ? 399 ? 6% 2% 67% 17%
Node js   Bad Output
PHP

PHP 7.3.0 (cli) (built: Dec 6 2018 12:47:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies

Node js

v11.9.0