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.34 627,224 929 29.88 74% 72% 65% 79%
n-body
source secs mem gz cpu cpu load
Node.js 26.61 33,152 1297 26.61 100% 0% 0% 1%
Java 22.10 33,136 1429 22.20 31% 1% 1% 70%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.72 613,608 748 63.70 85% 94% 99% 83%
Java 6.04 76,528 796 23.34 98% 97% 97% 97%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.79 31,900 381 15.79 100% 1% 0% 0%
Java 4.23 34,472 950 16.27 96% 97% 97% 96%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.14 243,736 1103 4.40 26% 21% 7% 53%
Java 1.03 191,064 2183 2.31 52% 57% 43% 74%
fasta
source secs mem gz cpu cpu load
Node.js 9.80 34,804 1785 9.82 100% 1% 0% 0%
Java 2.33 43,924 2473 6.07 53% 71% 63% 74%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 89.63 30,960 473 89.61 0% 100% 0% 1%
Java 17.26 32,116 1282 67.75 98% 99% 97% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 45.39 658,324 440 81.91 37% 39% 59% 46%
Java 8.34 893,008 835 28.20 87% 79% 96% 81%
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.70 375,568 1812 27.17 80% 72% 74% 88%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
Java 0.31 1,868 938 0.37 27% 14% 19% 72%
Node.js

v9.4.0

Java

java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)