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 32,608 1297 26.61 0% 0% 1% 100%
PHP 353.84 9,220 1082 353.77 0% 100% 1% 0%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.74 588,212 748 63.65 83% 97% 81% 98%
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,704 1785 9.83 66% 1% 0% 34%
PHP 59.12 9,412 1062 59.11 40% 0% 1% 60%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 89.85 30,216 473 89.83 100% 1% 0% 0%
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,352 381 15.79 100% 0% 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.67 657,468 440 81.85 45% 39% 39% 58%
PHP 79.01 736,908 1040 222.04 91% 95% 0% 95%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 61.72 1,824,796 935 136.24 71% 75% 76% 96%
PHP 41.39 242,044 1079 133.27 83% 76% 73% 91%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.18 241,932 1103 4.44 2% 47% 58% 2%
PHP 2.79 136,636 438 1.63 30% 35% 32% 57%
regex-redux
source secs mem gz cpu cpu load
Node.js 4.23 594,916 432 4.25 78% 1% 0% 24%
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.0.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