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.23 594,916 432 4.25 78% 1% 0% 24%
C++ g++ 1.61 203,572 1315 4.18 100% 52% 57% 54%
n-body
source secs mem gz cpu cpu load
Node.js 26.61 32,608 1297 26.61 0% 0% 1% 100%
C++ g++ 8.23 1,856 1763 8.23 100% 1% 1% 0%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.18 241,932 1103 4.44 2% 47% 58% 2%
C++ g++ 0.64 247,800 2280 1.03 89% 22% 31% 30%
fasta
source secs mem gz cpu cpu load
Node.js 9.80 34,704 1785 9.83 66% 1% 0% 34%
C++ g++ 1.49 4,372 2324 5.28 89% 88% 90% 90%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.79 31,352 381 15.79 100% 0% 0% 0%
C++ g++ 2.02 1,332 1044 7.91 99% 99% 99% 99%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 61.72 1,824,796 935 136.24 71% 75% 76% 96%
C++ g++ 7.75 165,180 1276 26.02 80% 96% 82% 79%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 89.85 30,216 473 89.83 100% 1% 0% 0%
C++ g++ 10.61 2,044 980 41.90 100% 96% 100% 100%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.74 588,212 748 63.65 83% 97% 81% 98%
C++ g++ 1.64 27,636 1002 6.51 100% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 45.67 657,468 440 81.85 45% 39% 39% 58%
C++ g++ 2.55 135,568 809 7.99 85% 96% 69% 66%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
C++ g++ 0.07 ? 513 0.07 0% 0% 86% 13%
Node.js

v9.0.0

C++ g++

g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0