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.02 507,480 452 4.02 0% 1% 100% 0%
C++ g++ 6.75 183,256 700 9.80 100% 39% 8% 0%
n-body
source secs mem gz cpu cpu load
Node.js 27.82 28,208 1297 27.81 1% 0% 1% 100%
C++ g++ 9.30 1,712 1763 9.29 100% 1% 1% 0%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.49 564,704 778 62.77 84% 84% 96% 97%
C++ g++ 5.82 33,952 726 22.40 96% 95% 95% 100%
reverse-complement
source secs mem gz cpu cpu load
Node.js 3.68 245,496 1088 3.93 4% 4% 98% 2%
C++ g++ 0.59 217,564 2275 0.84 26% 78% 12% 34%
fasta
source secs mem gz cpu cpu load
Node.js 9.45 31,892 1745 9.46 1% 1% 1% 100%
C++ g++ 1.47 9,484 2291 5.13 88% 88% 87% 88%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 78.41 27,192 473 78.39 1% 1% 100% 1%
C++ g++ 10.58 2,520 950 41.88 100% 100% 99% 98%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.77 28,804 425 15.77 1% 0% 1% 100%
C++ g++ 2.01 1,792 1044 8.00 100% 100% 100% 100%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 60.73 2,095,052 904 151.74 96% 84% 84% 83%
C++ g++ 7.15 164,080 1252 24.21 82% 83% 80% 96%
binary-trees
source secs mem gz cpu cpu load
Node.js 55.64 895,396 477 56.61 3% 52% 43% 5%
C++ g++ 3.36 158,320 846 10.59 81% 82% 78% 75%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
C++ g++ 0.07 ? 508 0.07 0% 13% 100% 0%
Node.js

v7.6.0

C++ g++

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609