The Computer Language
Benchmarks Game

Node js versus Java 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.

mandelbrot
source secs mem gz busy cpu load
Node js 6.80 88,168 1122 26.85 98% 98% 99% 99%
Java 6.83 79,108 796 26.86 97% 99% 99% 99%
regex-redux
source secs mem gz busy cpu load
Node js 10.46 789,476 668 13.29 16% 28% 74% 8%
Java 10.31 644,560 740 31.47 72% 72% 92% 70%
spectral-norm
source secs mem gz busy cpu load
Node js 4.37 60,716 999 16.63 97% 96% 94% 94%
Java 4.22 36,948 950 16.43 98% 97% 98% 96%
n-body
source secs mem gz busy cpu load
Node js 23.25 35,112 1268 24.63 5% 0% 100% 0%
Java 21.93 35,408 1429 22.44 1% 0% 100% 1%
fasta
source secs mem gz busy cpu load
Node js 3.40 65,372 2047 9.80 75% 64% 57% 93%
Java 2.22 45,172 2473 5.99 61% 50% 98% 60%
reverse-complement
source secs mem gz busy cpu load
Node js 4.85 1,331,224 1307 11.63 53% 74% 66% 46%
Java 3.16 712,368 2183 7.08 65% 47% 42% 70%
fannkuch-redux
source secs mem gz busy cpu load
Node js 24.87 57,276 1316 98.67 99% 99% 99% 99%
Java 14.33 34,888 1282 56.56 99% 98% 99% 98%
binary-trees
source secs mem gz busy cpu load
Node js 21.79 1,045,424 744 77.02 87% 91% 88% 88%
Java 8.32 953,620 835 28.37 95% 87% 81% 77%
k-nucleotide
source secs mem gz busy cpu load
Node js 25.81 398,104 1812 79.25 77% 77% 67% 86%
Java 9.33 447,976 1812 29.36 73% 83% 82% 77%
pidigits
source secs mem gz busy cpu load
Node js 12.48 65,080 530 13.42 46% 2% 3% 56%
Java 3.07 39,320 938 3.31 2% 5% 3% 98%
Node js

v13.7.0

Java

openjdk 13 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)