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.22 596,420 432 4.24 100% 0% 0% 1%
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 33,152 1297 26.61 100% 0% 0% 1%
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.14 243,736 1103 4.40 26% 21% 7% 53%
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,804 1785 9.82 100% 1% 0% 0%
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,900 381 15.79 100% 1% 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.24 1,739,992 935 137.09 80% 75% 95% 71%
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.63 30,960 473 89.61 0% 100% 0% 1%
C++ g++ 10.61 2,044 980 41.90 100% 96% 100% 100%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.72 613,608 748 63.70 85% 94% 99% 83%
C++ g++ 1.51 25,684 1791 5.99 100% 99% 99% 100%
binary-trees
source secs mem gz cpu cpu load
Node.js 45.39 658,324 440 81.91 37% 39% 59% 46%
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.4.0

C++ g++

g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0