The Computer Language
Benchmarks Game

PHP versus Node js fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? 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.82 1,150,424 668 5.90 10% 82% 1% 29%
pidigits
source secs mem gz busy cpu load
PHP 0.91 13,196 399 0.96 2% 0% 3% 100%
Node js 1.31 36,792 599 1.33 1% 0% 99% 2%
k-nucleotide
source secs mem gz busy cpu load
PHP 20.15 254,792 1079 69.22 91% 96% 80% 76%
Node js 15.82 396,716 1812 44.48 63% 47% 81% 90%
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.20 1,282,116 744 20.39 83% 70% 68% 63%
reverse-complement
source secs mem gz busy cpu load
PHP 7.06 534,336 446 11.90 14% 49% 40% 65%
Node js 2.21 1,534,824 1480 4.62 53% 22% 65% 68%
spectral-norm
source secs mem gz busy cpu load
PHP 7.51 35,364 1152 29.55 99% 98% 98% 98%
Node js 1.64 67,912 999 6.11 92% 93% 96% 92%
fannkuch-redux
source secs mem gz busy cpu load
PHP 63.18 44,168 1160 250.98 99% 99% 100% 99%
Node js 11.38 65,452 1313 45.00 99% 99% 99% 99%
mandelbrot
source secs mem gz busy cpu load
PHP 24.89 135,480 875 99.12 100% 100% 99% 100%
Node js 4.04 95,888 1122 15.91 100% 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.60 36,000 1268 8.85 100% 2% 0% 1%
fasta
source secs mem gz busy cpu load
PHP 22.82 12,356 1062 24.32 3% 2% 2% 100%
Node js 1.91 72,004 2047 6.18 81% 88% 78% 78%
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

v16.8.0