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.15 448,996 452 4.15 42% 58% 1% 0%
Java 12.31 902,528 929 38.75 73% 76% 86% 81%
n-body
source secs mem gz cpu cpu load
Node.js 27.76 27,704 1297 27.76 100% 0% 1% 1%
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.95 641,352 778 64.47 98% 82% 86% 95%
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
reverse-complement
source secs mem gz cpu cpu load
Node.js 3.72 244,156 1088 3.99 1% 8% 3% 98%
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.77 28,192 368 15.76 0% 1% 100% 0%
Java 4.29 29,884 950 16.56 96% 97% 99% 95%
fasta
source secs mem gz cpu cpu load
Node.js 9.39 31,212 1745 9.40 100% 1% 1% 0%
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
binary-trees
source secs mem gz cpu cpu load
Node.js 51.21 931,768 440 51.98 57% 10% 30% 5%
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 78.16 26,632 473 78.13 100% 2% 3% 2%
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 62.09 2,089,424 904 152.72 82% 85% 95% 82%
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

v7.9.0

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)