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.

fannkuch-redux
source secs mem gz busy cpu load
Node js 11.89 61,216 1313 45.33 96% 94% 96% 94%
C++ g++ 8.08 1,900 980 31.45 98% 100% 98% 93%
pidigits
source secs mem gz busy cpu load
Node js 1.16 34,980 599 1.21 1% 1% 99% 3%
C++ g++ 0.60 4,944 986 2.38 100% 100% 98% 100%
n-body
source secs mem gz busy cpu load
Node js 8.36 34,332 1268 8.37 0% 0% 0% 100%
C++ g++ 4.09 1,800 1808 4.13 100% 0% 0% 0%
spectral-norm
source secs mem gz busy cpu load
Node js 1.84 61,080 999 6.15 84% 81% 86% 83%
C++ g++ 0.72 1,216 1044 2.86 100% 100% 99% 100%
fasta
source secs mem gz busy cpu load
Node js 2.02 67,936 2047 6.27 78% 81% 75% 75%
C++ g++ 0.78 2,468 2751 1.62 8% 99% 99% 3%
reverse-complement
source secs mem gz busy cpu load
Node js 2.12 1,525,056 1481 4.38 48% 27% 70% 62%
C++ g++ 0.63 499,704 2093 0.64 0% 100% 2% 0%
regex-redux
source secs mem gz busy cpu load
Node js 4.76 1,152,392 668 5.82 1% 1% 28% 91%
C++ g++ 1.08 203,816 1315 3.38 78% 99% 65% 73%
mandelbrot
source secs mem gz busy cpu load
Node js 4.03 89,888 1122 15.89 99% 98% 98% 99%
C++ g++ 0.84 34,604 3542 3.28 98% 99% 98% 95%
binary-trees
source secs mem gz busy cpu load
Node js 7.34 1,262,364 744 22.41 75% 84% 72% 75%
C++ g++ 1.04 154,824 1122 3.74 88% 100% 88% 86%
k-nucleotide
source secs mem gz busy cpu load
Node js 15.48 395,304 1812 42.72 77% 92% 61% 46%
C++ g++ 1.95 156,372 1631 5.95 73% 70% 92% 70%
Node js

v15.2.1

C++ g++

g++ (Ubuntu 10.2.0-13ubuntu1) 10.2.0