The Computer Language
Benchmarks Game

Node js versus C++ g++ fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

pidigits
source secs mem gz busy cpu load
Node js 1.32 36,176 599 1.50 3% 2% 8% 100%
C++ g++ 0.89 4,236 513 0.89 0% 0% 100% 0%
fannkuch-redux
source secs mem gz busy cpu load
Node js 12.10 57,164 1313 47.74 98% 98% 99% 99%
C++ g++ 7.92 1,700 980 30.88 100% 99% 98% 93%
n-body
source secs mem gz busy cpu load
Node js 8.35 35,628 1268 8.48 1% 100% 0% 0%
C++ g++ 3.94 1,604 1808 4.02 0% 1% 100% 1%
spectral-norm
source secs mem gz busy cpu load
Node js 1.68 62,068 999 6.05 89% 90% 91% 90%
C++ g++ 0.72 2,348 1044 2.84 100% 99% 99% 99%
fasta
source secs mem gz busy cpu load
Node js 2.04 67,420 2047 6.33 76% 85% 75% 74%
C++ g++ 0.85 2,020 2711 3.13 92% 92% 92% 93%
reverse-complement
source secs mem gz busy cpu load
Node js 2.19 1,340,520 1480 4.46 48% 55% 50% 50%
C++ g++ 0.63 499,668 2093 0.64 2% 0% 0% 100%
binary-trees
source secs mem gz busy cpu load
Node js 5.83 1,204,544 711 19.61 86% 82% 84% 85%
C++ g++ 1.53 112,820 1270 4.03 99% 59% 52% 53%
regex-redux
source secs mem gz busy cpu load
Node js 4.27 1,064,544 668 5.47 4% 2% 75% 47%
C++ g++ 1.03 275,752 2850 2.19 36% 37% 100% 40%
mandelbrot
source secs mem gz busy cpu load
Node js 4.01 86,468 1122 15.74 98% 98% 99% 98%
C++ g++ 0.88 34,608 3542 3.47 98% 100% 98% 97%
k-nucleotide
source secs mem gz busy cpu load
Node js 15.06 398,672 1812 41.57 76% 60% 48% 92%
C++ g++ 1.98 156,108 1631 5.92 96% 67% 68% 68%
Node js

v14.4.0

C++ g++

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0