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 28.74 32,016 1297 28.73 100% 0% 0% 1%
PHP 358.21 8,668 1082 358.12 17% 0% 1% 83%
mandelbrot
source secs mem gz cpu cpu load
Node.js 19.04 311,404 778 67.84 82% 96% 83% 97%
PHP 125.17 136,776 863 499.16 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Node.js 9.79 35,012 1745 9.81 1% 0% 1% 100%
PHP 59.37 8,896 1030 59.36 5% 2% 3% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 81.49 29,880 473 81.46 100% 1% 1% 0%
PHP 280.04 33,588 1150 1,117.48 100% 100% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Node.js 16.17 31,288 368 16.17 100% 1% 1% 0%
PHP 37.94 19,420 1135 150.67 99% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 53.64 918,808 440 55.05 68% 2% 5% 30%
PHP 88.07 736,372 1027 247.49 92% 77% 23% 91%
regex-redux
source secs mem gz cpu cpu load
Node.js 4.44 511,916 452 4.45 0% 87% 2% 14%
PHP 3.34 158,792 786 3.30 25% 26% 22% 92%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 66.07 76,980 904 152.53 96% 77% 78% 77%
PHP 43.96 235,632 1060 142.28 87% 100% 71% 72%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.30 243,956 1088 4.63 5% 93% 7% 3%
PHP 2.81 135,124 426 1.75 31% 21% 44% 57%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
PHP 0.12 ? 394 0.11 100% 7% 0% 0%
Node.js

v8.4.0

PHP

PHP 7.1.4 (cli) (built: Apr 16 2017 16:17:54) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies