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.15 448,996 452 4.15 42% 58% 1% 0%
C++ g++ 17.14 220,088 853 25.22 95% 3% 51% 1%
n-body
source secs mem gz cpu cpu load
Node.js 27.76 27,704 1297 27.76 100% 0% 1% 1%
C++ g++ 9.31 1,052 1544 9.30 1% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Node.js 3.72 244,156 1088 3.99 1% 8% 3% 98%
C++ g++ 0.60 211,852 2275 0.98 38% 25% 82% 27%
fasta
source secs mem gz cpu cpu load
Node.js 9.39 31,212 1745 9.40 100% 1% 1% 0%
C++ g++ 1.48 4,176 2313 5.25 89% 90% 88% 89%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 78.16 26,632 473 78.13 100% 2% 3% 2%
C++ g++ 10.35 2,624 980 40.60 99% 99% 100% 95%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.77 28,192 368 15.76 0% 1% 100% 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 62.09 2,089,424 904 152.72 82% 85% 95% 82%
C++ g++ 7.18 164,052 1252 24.28 83% 83% 93% 83%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.95 641,352 778 64.47 98% 82% 86% 95%
C++ g++ 1.73 34,064 1002 6.80 98% 98% 98% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 51.21 931,768 440 51.98 57% 10% 30% 5%
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

v7.9.0

C++ g++

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