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.54 56,856 1313 45.73 99% 99% 99% 99%
C++ g++ 7.92 1,700 980 30.88 100% 99% 98% 93%
pidigits
source secs mem gz busy cpu load
Node js 1.30 36,036 599 1.32 0% 1% 100% 1%
C++ g++ 0.89 4,236 513 0.89 0% 0% 100% 0%
n-body
source secs mem gz busy cpu load
Node js 8.38 35,220 1268 8.47 1% 0% 100% 0%
C++ g++ 3.94 1,604 1808 4.02 0% 1% 100% 1%
fasta
source secs mem gz busy cpu load
Node js 1.91 67,116 2047 6.13 77% 81% 78% 86%
C++ g++ 0.85 2,020 2711 3.13 92% 92% 92% 93%
spectral-norm
source secs mem gz busy cpu load
Node js 1.66 62,744 999 6.04 90% 90% 93% 90%
C++ g++ 0.72 2,348 1044 2.84 100% 99% 99% 99%
reverse-complement
source secs mem gz busy cpu load
Node js 2.07 1,520,640 1481 4.26 14% 67% 61% 62%
C++ g++ 0.63 499,668 2093 0.64 2% 0% 0% 100%
regex-redux
source secs mem gz busy cpu load
Node js 4.67 1,115,744 668 5.76 2% 2% 29% 91%
C++ g++ 1.03 275,752 2850 2.19 36% 37% 100% 40%
mandelbrot
source secs mem gz busy cpu load
Node js 4.04 87,468 1122 15.91 99% 98% 98% 98%
C++ g++ 0.89 34,540 3542 3.47 98% 98% 97% 99%
binary-trees
source secs mem gz busy cpu load
Node js 5.75 1,221,440 711 19.16 81% 88% 84% 80%
C++ g++ 1.16 200,288 890 4.19 89% 88% 87% 98%
k-nucleotide
source secs mem gz busy cpu load
Node js 15.41 392,344 1812 42.69 45% 93% 61% 78%
C++ g++ 1.98 156,108 1631 5.92 96% 67% 68% 68%
Node js

v14.8.0

C++ g++

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0