The Computer Language
Benchmarks Game

Node js programs versus Java

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Node js 4.22 596,420 432 4.24 100% 0% 0% 1%
Java 10.51 573,972 929 31.30 70% 73% 70% 86%
n-body
source secs mem gz cpu cpu load
Node js 26.61 33,152 1297 26.61 100% 0% 0% 1%
Java 22.17 33,040 1489 22.27 100% 1% 0% 1%
mandelbrot
source secs mem gz cpu cpu load
Node js 17.72 613,608 748 63.70 85% 94% 99% 83%
Java 6.10 76,520 796 23.59 97% 98% 98% 96%
spectral-norm
source secs mem gz cpu cpu load
Node js 15.79 31,900 381 15.79 100% 1% 0% 0%
Java 4.38 35,388 950 16.80 96% 96% 95% 97%
fasta
source secs mem gz cpu cpu load
Node js 9.80 34,804 1785 9.82 100% 1% 0% 0%
Java 2.27 43,628 2473 5.93 51% 75% 57% 81%
fannkuch-redux
source secs mem gz cpu cpu load
Node js 89.63 30,960 473 89.61 0% 100% 0% 1%
Java 18.27 31,820 1282 72.06 99% 99% 98% 98%
reverse-complement
source secs mem gz cpu cpu load
Node js 16.66 706,256 1103 17.71 71% 51% 40% 48%
Java 3.15 680,424 2183 7.07 52% 70% 43% 63%
binary-trees
source secs mem gz cpu cpu load
Node js 45.39 658,324 440 81.91 37% 39% 59% 46%
Java 8.39 933,808 835 28.28 82% 86% 84% 88%
k-nucleotide
source secs mem gz cpu cpu load
Node js 61.24 1,739,992 935 137.09 80% 75% 95% 71%
Java 8.75 385,056 1812 27.09 85% 72% 70% 85%
pidigits
source secs mem gz cpu cpu load
Node js   Bad Output
Java 0.28 1,028 938 0.36 43% 11% 19% 66%
Node js

v9.4.0

Java

java 10 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)