The Computer Language
Benchmarks Game

Node.js programs versus C++ g++

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Node.js 4.44 511,916 452 4.45 0% 87% 2% 14%
C++ g++ 17.14 220,088 853 25.22 95% 3% 51% 1%
n-body
source secs mem gz cpu cpu load
Node.js 28.74 32,016 1297 28.73 100% 0% 0% 1%
C++ g++ 9.31 1,052 1544 9.30 1% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Node.js 9.79 35,012 1745 9.81 1% 0% 1% 100%
C++ g++ 1.48 4,176 2313 5.25 89% 90% 88% 89%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.30 243,956 1088 4.63 5% 93% 7% 3%
C++ g++ 0.60 211,852 2275 0.98 38% 25% 82% 27%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 81.49 29,880 473 81.46 100% 1% 1% 0%
C++ g++ 10.35 2,624 980 40.60 99% 99% 100% 95%
spectral-norm
source secs mem gz cpu cpu load
Node.js 16.17 31,288 368 16.17 100% 1% 1% 0%
C++ g++ 1.99 1,880 1044 7.89 100% 99% 99% 99%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 66.07 76,980 904 152.53 96% 77% 78% 77%
C++ g++ 7.18 164,052 1252 24.28 83% 83% 93% 83%
mandelbrot
source secs mem gz cpu cpu load
Node.js 19.04 311,404 778 67.84 82% 96% 83% 97%
C++ g++ 1.73 34,064 1002 6.80 98% 98% 98% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 53.64 918,808 440 55.05 68% 2% 5% 30%
C++ g++ 2.36 114,404 809 7.69 86% 71% 87% 85%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
C++ g++ 0.07 ? 508 0.07 0% 0% 89% 0%
Node.js

v8.4.0

C++ g++

g++ (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406