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.06 552,548 452 4.06 1% 1% 100% 0%
Java 12.31 902,528 929 38.75 73% 76% 86% 81%
n-body
source secs mem gz cpu cpu load
Node.js 28.04 29,800 1297 28.03 100% 1% 0% 0%
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.95 567,152 778 64.66 83% 84% 98% 97%
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
reverse-complement
source secs mem gz cpu cpu load
Node.js 3.68 244,548 1088 3.93 3% 6% 98% 2%
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.78 33,996 368 15.77 1% 0% 100% 1%
Java 4.29 29,884 950 16.56 96% 97% 99% 95%
fasta
source secs mem gz cpu cpu load
Node.js 9.45 33,288 1745 9.46 1% 1% 99% 1%
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
binary-trees
source secs mem gz cpu cpu load
Node.js 54.38 948,260 440 55.52 19% 27% 55% 2%
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 78.82 28,508 473 78.80 1% 0% 100% 0%
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 66.35 2,045,604 904 159.54 97% 80% 82% 80%
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
Java 0.23 784 938 0.24 48% 57% 9% 9%
Node.js

v8.1.3

Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)