The Computer Language
Benchmarks Game

Node.js programs versus PHP

by benchmark task performance

n-body
source secs mem gz cpu cpu load
Node.js 26.61 33,152 1297 26.61 100% 0% 0% 1%
PHP 353.84 9,220 1082 353.77 0% 100% 1% 0%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.72 613,608 748 63.70 85% 94% 99% 83%
PHP 118.07 137,452 875 471.57 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Node.js 9.80 34,804 1785 9.82 100% 1% 0% 0%
PHP 59.12 9,412 1062 59.11 40% 0% 1% 60%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 89.63 30,960 473 89.61 0% 100% 0% 1%
PHP 233.57 34,748 1160 929.49 100% 99% 100% 99%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.79 31,900 381 15.79 100% 1% 0% 0%
PHP 37.09 20,208 1152 147.78 100% 100% 100% 100%
binary-trees
source secs mem gz cpu cpu load
Node.js 45.39 658,324 440 81.91 37% 39% 59% 46%
PHP 79.01 736,908 1040 222.04 91% 95% 0% 95%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 61.24 1,739,992 935 137.09 80% 75% 95% 71%
PHP 41.39 242,044 1079 133.27 83% 76% 73% 91%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.14 243,736 1103 4.40 26% 21% 7% 53%
PHP 2.79 136,636 438 1.63 30% 35% 32% 57%
regex-redux
source secs mem gz cpu cpu load
Node.js 4.22 596,420 432 4.24 100% 0% 0% 1%
PHP 2.63 270,048 816 2.46 38% 39% 85% 38%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
PHP 0.12 ? 399 0.10 0% 55% 100% 0%
Node.js

v9.4.0

PHP

PHP 7.2.0 (cli) (built: Nov 30 2017 10:13:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies