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.

pidigits
source secs mem gz busy cpu load
PHP 0.91 13,196 399 0.96 2% 0% 3% 100%
Node js 6.14 66,508 530 6.25 1% 0% 77% 24%
regex-redux
source secs mem gz busy cpu load
PHP 1.73 162,348 816 3.58 37% 88% 44% 39%
Node js 4.79 1,159,940 668 5.86 91% 2% 1% 29%
k-nucleotide
source secs mem gz busy cpu load
PHP 20.15 254,792 1079 69.22 91% 96% 80% 76%
Node js 15.73 392,924 1812 43.25 91% 62% 75% 47%
binary-trees
source secs mem gz busy cpu load
PHP 18.64 1,588,704 760 67.29 89% 90% 96% 86%
Node js 6.95 1,309,892 744 21.41 76% 75% 88% 69%
reverse-complement
source secs mem gz busy cpu load
PHP 7.06 534,336 446 11.90 14% 49% 40% 65%
Node js 2.13 1,525,096 1481 4.31 11% 70% 62% 60%
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 64,452 999 6.18 83% 86% 83% 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.97 63,036 1313 45.89 96% 96% 95% 96%
mandelbrot
source secs mem gz busy cpu load
PHP 24.89 135,480 875 99.12 100% 100% 99% 100%
Node js 4.04 92,960 1122 15.95 100% 98% 98% 98%
n-body
source secs mem gz busy cpu load
PHP 71.75 12,072 1082 76.86 3% 1% 2% 100%
Node js 8.39 35,548 1268 8.74 0% 2% 2% 100%
fasta
source secs mem gz busy cpu load
PHP 22.82 12,356 1062 24.32 3% 2% 2% 100%
Node js 2.04 71,304 2047 6.32 75% 80% 80% 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.10.0