The Computer Language
Benchmarks Game

Node js versus Java fastest programs

by faster benchmark performance

regex-redux
source secs mem gz cpu cpu load
Node js 12.05 854,584 408 12.87 29% 47% 21% 12%
Java 10.50 571,736 929 31.63 71% 73% 66% 92%
n-body
source secs mem gz cpu cpu load
Node js 26.31 33,476 1297 26.30 0% 0% 1% 100%
Java 22.00 32,272 1489 22.07 1% 0% 0% 100%
mandelbrot
source secs mem gz cpu cpu load
Node js 18.21 605,668 748 65.22 84% 82% 96% 97%
Java 6.96 76,316 796 27.06 97% 97% 97% 97%
binary-trees
source secs mem gz cpu cpu load
Node js 23.87 355,268 431 39.40 36% 30% 72% 35%
Java 8.39 960,056 835 27.39 81% 85% 74% 90%
spectral-norm
source secs mem gz cpu cpu load
Node js 15.81 31,780 381 15.81 2% 100% 1% 2%
Java 4.26 33,572 950 16.39 96% 96% 98% 95%
fasta
source secs mem gz cpu cpu load
Node js 9.15 37,052 1785 9.20 27% 0% 1% 74%
Java 2.32 42,212 2473 6.30 65% 85% 47% 76%
fannkuch-redux
source secs mem gz cpu cpu load
Node js 80.97 30,924 473 80.95 0% 100% 1% 0%
Java 17.98 31,180 1282 70.57 97% 99% 97% 99%
reverse-complement
source secs mem gz cpu cpu load
Node js 16.61 708,876 1103 18.16 11% 54% 14% 31%
Java 3.32 609,712 2183 7.54 64% 44% 44% 76%
k-nucleotide
source secs mem gz cpu cpu load
Node js 64.56 1,819,728 935 137.90 69% 74% 92% 76%
Java 8.74 470,116 1812 27.12 71% 73% 93% 74%
pidigits
source secs mem gz cpu cpu load
Node js   Bad Output
Java 1.85 ? 938 ? 12% 28% 50% 16%
Node js

v11.9.0

Java

openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)