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.

regex-redux
source secs mem gz busy cpu load
Node js 4.76 1,152,480 668 5.85 29% 91% 1% 1%
Java 5.70 656,328 929 18.25 89% 76% 79% 75%
mandelbrot
source secs mem gz busy cpu load
Node js 4.04 89,736 1122 15.91 98% 99% 98% 98%
Java 4.11 68,204 796 16.20 98% 99% 98% 99%
fannkuch-redux
source secs mem gz busy cpu load
Node js 11.92 61,268 1313 45.47 95% 94% 96% 96%
Java 11.00 34,104 1282 43.42 99% 98% 98% 99%
spectral-norm
source secs mem gz busy cpu load
Node js 1.84 61,216 999 6.16 83% 84% 85% 83%
Java 1.68 38,348 950 6.43 96% 96% 96% 95%
n-body
source secs mem gz busy cpu load
Node js 8.40 34,280 1268 8.84 1% 3% 2% 100%
Java 6.75 35,200 1489 6.83 0% 0% 100% 1%
reverse-complement
source secs mem gz busy cpu load
Node js 2.12 1,522,216 1480 4.32 58% 60% 14% 72%
Java 1.54 702,332 2183 3.55 78% 46% 49% 57%
pidigits
source secs mem gz busy cpu load
Node js 1.16 34,968 599 1.18 99% 2% 0% 1%
Java 0.79 35,568 764 0.84 99% 3% 3% 1%
fasta
source secs mem gz busy cpu load
Node js 2.02 67,708 2047 6.24 77% 75% 83% 74%
Java 1.27 43,968 2473 3.92 73% 95% 70% 70%
binary-trees
source secs mem gz busy cpu load
Node js 7.54 1,363,756 744 22.72 74% 73% 73% 82%
Java 2.50 2,487,096 835 7.90 88% 75% 75% 79%
k-nucleotide
source secs mem gz busy cpu load
Node js 15.73 395,496 1812 43.40 76% 61% 94% 45%
Java 5.00 408,040 1812 16.36 74% 81% 86% 86%
Node js

v15.0.1

Java

openjdk 15 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)