The Computer Language
Benchmarks Game

PHP versus Node js fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

regex-redux
source secs mem gz busy cpu load
PHP 1.71 271,952 816 3.50 37% 75% 43% 50%
Node js 4.67 1,115,744 668 5.76 2% 2% 29% 91%
pidigits
source secs mem gz busy cpu load
PHP 0.99 9,116 399 1.01 1% 0% 1% 100%
Node js 1.30 36,036 599 1.32 0% 1% 100% 1%
k-nucleotide
source secs mem gz busy cpu load
PHP 24.68 215,640 1079 88.67 93% 81% 96% 89%
Node js 15.41 392,344 1812 42.69 45% 93% 61% 78%
reverse-complement
source secs mem gz busy cpu load
PHP 7.30 508,064 438 11.41 2% 30% 55% 69%
Node js 2.07 1,520,640 1481 4.26 14% 67% 61% 62%
binary-trees
source secs mem gz busy cpu load
PHP 26.46 1,584,464 751 96.13 85% 97% 91% 90%
Node js 5.75 1,221,440 711 19.16 81% 88% 84% 80%
spectral-norm
source secs mem gz busy cpu load
PHP 17.84 24,120 1152 71.08 100% 100% 100% 100%
Node js 1.66 62,744 999 6.04 90% 90% 93% 90%
fannkuch-redux
source secs mem gz busy cpu load
PHP 129.48 22,468 1160 514.90 99% 99% 100% 99%
Node js 11.54 56,856 1313 45.73 99% 99% 99% 99%
fasta
source secs mem gz busy cpu load
PHP 32.86 8,004 1062 33.02 0% 100% 0% 0%
Node js 1.91 67,116 2047 6.13 77% 81% 78% 86%
mandelbrot
source secs mem gz busy cpu load
PHP 73.71 123,856 875 294.40 100% 100% 100% 100%
Node js 4.04 87,468 1122 15.91 99% 98% 98% 98%
n-body
source secs mem gz busy cpu load
PHP 221.47 7,836 1082 226.63 1% 100% 1% 1%
Node js 8.38 35,220 1268 8.47 1% 0% 100% 0%
PHP

PHP 7.4.7 (cli) (built: Jun 25 2020 16:42:51) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Node js

v14.8.0