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.

pidigits
source secs mem gz busy cpu load
Node js 1.31 36,792 599 1.33 1% 0% 99% 2%
C++ g++ 0.66 5,152 986 2.63 100% 100% 100% 100%
spectral-norm
source secs mem gz busy cpu load
Node js 1.64 67,912 999 6.11 92% 93% 96% 92%
C++ g++ 0.72 1,192 1044 2.85 99% 99% 100% 100%
fasta
source secs mem gz busy cpu load
Node js 1.91 72,004 2047 6.18 81% 88% 78% 78%
C++ g++ 0.77 2,504 2751 1.52 64% 0% 99% 37%
fannkuch-redux
source secs mem gz busy cpu load
Node js 11.38 65,452 1313 45.00 99% 99% 99% 99%
C++ g++ 3.29 1,892 1528 13.06 100% 100% 100% 97%
n-body
source secs mem gz busy cpu load
Node js 8.60 36,000 1268 8.85 100% 2% 0% 1%
C++ g++ 2.12 764 1927 2.17 0% 2% 100% 0%
reverse-complement
source secs mem gz busy cpu load
Node js 2.21 1,534,824 1480 4.62 53% 22% 65% 68%
C++ g++ 0.52 1,788 1853 0.52 0% 98% 0% 2%
regex-redux
source secs mem gz busy cpu load
Node js 4.82 1,150,424 668 5.90 10% 82% 1% 29%
C++ g++ 1.10 203,924 1315 3.43 63% 77% 71% 100%
mandelbrot
source secs mem gz busy cpu load
Node js 4.04 95,888 1122 15.91 100% 98% 98% 99%
C++ g++ 0.84 34,780 3542 3.27 99% 98% 98% 96%
binary-trees
source secs mem gz busy cpu load
Node js 7.20 1,282,116 744 20.39 83% 70% 68% 63%
C++ g++ 0.94 176,428 1122 3.39 86% 88% 100% 85%
k-nucleotide
source secs mem gz busy cpu load
Node js 15.82 396,716 1812 44.48 63% 47% 81% 90%
C++ g++ 1.93 156,548 1631 5.88 69% 93% 69% 75%
Node js

v16.8.0

C++ g++

g++ (Ubuntu 10.3.0-1ubuntu1) 10.3.0