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.23 594,916 432 4.25 78% 1% 0% 24%
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 32,608 1297 26.61 0% 0% 1% 100%
Java 22.10 33,136 1429 22.20 31% 1% 1% 70%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.74 588,212 748 63.65 83% 97% 81% 98%
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,352 381 15.79 100% 0% 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.18 241,932 1103 4.44 2% 47% 58% 2%
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,704 1785 9.83 66% 1% 0% 34%
Java 2.33 43,924 2473 6.07 53% 71% 63% 74%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 89.85 30,216 473 89.83 100% 1% 0% 0%
Java 17.26 32,116 1282 67.75 98% 99% 97% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 45.67 657,468 440 81.85 45% 39% 39% 58%
Java 8.34 893,008 835 28.20 87% 79% 96% 81%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 61.72 1,824,796 935 136.24 71% 75% 76% 96%
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.0.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)