The Computer Language
Benchmarks Game

Node js versus C++ g++ fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

n-body
source secs mem gz busy cpu load
Node js 8.37 35,576 1268 8.37 0% 0% 100% 0%
C++ g++ 4.09 1,800 1808 4.13 100% 0% 0% 0%
fannkuch-redux
source secs mem gz busy cpu load
Node js 11.97 62,956 1313 45.59 95% 94% 94% 97%
C++ g++ 4.91 1,912 1482 19.45 100% 99% 97% 100%
spectral-norm
source secs mem gz busy cpu load
Node js 1.84 64,452 999 6.18 83% 86% 83% 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.04 71,304 2047 6.32 75% 80% 80% 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.13 1,525,096 1481 4.31 11% 70% 62% 60%
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.79 1,159,940 668 5.86 91% 2% 1% 29%
C++ g++ 1.08 203,816 1315 3.38 78% 99% 65% 73%
mandelbrot
source secs mem gz busy cpu load
Node js 4.04 92,960 1122 15.95 100% 98% 98% 98%
C++ g++ 0.84 34,604 3542 3.28 98% 99% 98% 95%
binary-trees
source secs mem gz busy cpu load
Node js 6.95 1,309,892 744 21.41 76% 75% 88% 69%
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.73 392,924 1812 43.25 91% 62% 75% 47%
C++ g++ 1.95 156,372 1631 5.95 73% 70% 92% 70%
pidigits
source secs mem gz busy cpu load
Node js 6.14 66,508 530 6.25 1% 0% 77% 24%
C++ g++ 0.60 4,944 986 2.38 100% 100% 98% 100%
Node js

v15.10.0

C++ g++

g++ (Ubuntu 10.2.0-13ubuntu1) 10.2.0