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.

pidigits
source secs mem gz busy cpu load
Node js 2.58 36,004 599 2.67 1% 1% 100% 2%
Java 3.07 38,408 938 3.39 0% 8% 99% 3%
regex-redux
source secs mem gz busy cpu load
Node js 9.96 757,188 668 12.06 8% 45% 9% 59%
Java 10.13 644,456 929 31.05 73% 75% 91% 67%
fannkuch-redux
source secs mem gz busy cpu load
Node js 17.80 58,292 1313 70.33 99% 99% 99% 98%
Java 17.89 33,352 1282 70.90 98% 100% 100% 99%
n-body
source secs mem gz busy cpu load
Node js 23.25 35,092 1268 23.48 0% 0% 1% 100%
Java 22.67 34,892 1429 23.01 1% 0% 0% 100%
spectral-norm
source secs mem gz busy cpu load
Node js 4.29 62,616 999 16.51 96% 96% 96% 97%
Java 4.14 36,456 950 16.16 97% 99% 98% 97%
mandelbrot
source secs mem gz busy cpu load
Node js 6.72 88,548 1122 26.50 98% 99% 99% 98%
Java 5.93 76,272 796 23.28 97% 99% 98% 98%
reverse-complement
source secs mem gz busy cpu load
Node js 4.15 1,472,268 1481 8.65 34% 63% 35% 77%
Java 3.14 730,620 2183 7.02 72% 45% 51% 55%
fasta
source secs mem gz busy cpu load
Node js 3.42 68,068 2047 9.82 74% 89% 71% 54%
Java 2.23 43,292 2473 6.05 63% 48% 92% 68%
binary-trees
source secs mem gz busy cpu load
Node js 17.71 1,053,736 744 63.60 90% 89% 89% 91%
Java 8.25 964,656 835 27.65 79% 96% 76% 84%
k-nucleotide
source secs mem gz busy cpu load
Node js 26.33 396,388 1812 79.49 94% 59% 79% 70%
Java 9.08 404,688 1812 29.03 77% 77% 93% 73%
Node js

v13.12.0

Java

openjdk 14 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)