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.73 162,348 816 3.58 37% 88% 44% 39%
Node js 4.76 1,152,392 668 5.82 1% 1% 28% 91%
pidigits
source secs mem gz busy cpu load
PHP 0.91 13,196 399 0.96 2% 0% 3% 100%
Node js 1.16 34,980 599 1.21 1% 1% 99% 3%
k-nucleotide
source secs mem gz busy cpu load
PHP 20.15 254,792 1079 69.22 91% 96% 80% 76%
Node js 15.48 395,304 1812 42.72 77% 92% 61% 46%
binary-trees
source secs mem gz busy cpu load
PHP 18.64 1,588,704 760 67.29 89% 90% 96% 86%
Node js 7.34 1,262,364 744 22.41 75% 84% 72% 75%
reverse-complement
source secs mem gz busy cpu load
PHP 7.06 534,336 446 11.90 14% 49% 40% 65%
Node js 2.12 1,525,056 1481 4.38 48% 27% 70% 62%
spectral-norm
source secs mem gz busy cpu load
PHP 7.51 35,364 1152 29.55 99% 98% 98% 98%
Node js 1.84 61,080 999 6.15 84% 81% 86% 83%
fannkuch-redux
source secs mem gz busy cpu load
PHP 63.18 44,168 1160 250.98 99% 99% 100% 99%
Node js 11.89 61,216 1313 45.33 96% 94% 96% 94%
mandelbrot
source secs mem gz busy cpu load
PHP 24.89 135,480 875 99.12 100% 100% 99% 100%
Node js 4.03 89,888 1122 15.89 99% 98% 98% 99%
n-body
source secs mem gz busy cpu load
PHP 71.75 12,072 1082 76.86 3% 1% 2% 100%
Node js 8.36 34,332 1268 8.37 0% 0% 0% 100%
fasta
source secs mem gz busy cpu load
PHP 22.82 12,356 1062 24.32 3% 2% 2% 100%
Node js 2.02 67,936 2047 6.27 78% 81% 75% 75%
PHP

PHP 8.0.0 (cli) (built: Nov 26 2020 09:02:29) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies

Node js

v15.2.1