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.

reverse-complement
source secs mem gz busy cpu load
Node js 4.85 1,331,224 1307 11.63 53% 74% 66% 46%
C++ g++ 4.72 500,116 840 4.76 100% 0% 0% 0%
spectral-norm
source secs mem gz busy cpu load
Node js 4.37 60,716 999 16.63 97% 96% 94% 94%
C++ g++ 1.98 2,320 1044 7.90 99% 100% 99% 100%
fannkuch-redux
source secs mem gz busy cpu load
Node js 24.87 57,276 1316 98.67 99% 99% 99% 99%
C++ g++ 10.70 1,864 980 42.31 96% 100% 100% 100%
fasta
source secs mem gz busy cpu load
Node js 3.40 65,372 2047 9.80 75% 64% 57% 93%
C++ g++ 1.46 2,180 2711 4.39 75% 75% 75% 75%
n-body
source secs mem gz busy cpu load
Node js 23.25 35,112 1268 24.63 5% 0% 100% 0%
C++ g++ 7.70 1,772 1879 8.02 4% 0% 0% 100%
mandelbrot
source secs mem gz busy cpu load
Node js 6.80 88,168 1122 26.85 98% 98% 99% 99%
C++ g++ 1.51 25,708 1791 6.01 99% 99% 99% 100%
binary-trees
source secs mem gz busy cpu load
Node js 21.79 1,045,424 744 77.02 87% 91% 88% 88%
C++ g++ 3.93 113,768 809 12.78 70% 81% 75% 98%
regex-redux
source secs mem gz busy cpu load
Node js 10.46 789,476 668 13.29 16% 28% 74% 8%
C++ g++ 1.85 203,748 1315 4.44 48% 100% 43% 48%
pidigits
source secs mem gz busy cpu load
Node js 12.48 65,080 530 13.42 46% 2% 3% 56%
C++ g++ 1.89 4,460 513 1.95 2% 0% 100% 1%
k-nucleotide
source secs mem gz busy cpu load
Node js 25.81 398,104 1812 79.25 77% 77% 67% 86%
C++ g++ 3.89 156,148 1631 11.99 94% 74% 70% 71%
Node js

v13.7.0

C++ g++

g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008