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.02 507,480 452 4.02 0% 1% 100% 0%
Java 12.16 927,212 929 37.28 73% 81% 75% 78%
n-body
source secs mem gz cpu cpu load
Node.js 27.82 28,208 1297 27.81 1% 0% 1% 100%
Java 21.50 27,240 1489 21.52 1% 1% 100% 0%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.49 564,704 778 62.77 84% 84% 96% 97%
Java 5.89 89,504 796 23.08 98% 98% 98% 99%
reverse-complement
source secs mem gz cpu cpu load
Node.js 3.68 245,496 1088 3.93 4% 4% 98% 2%
Java 1.11 345,308 1661 2.44 33% 58% 54% 80%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.77 28,804 425 15.77 1% 0% 1% 100%
Java 4.29 31,428 950 16.56 97% 96% 98% 97%
fasta
source secs mem gz cpu cpu load
Node.js 9.45 31,892 1745 9.46 1% 1% 1% 100%
Java 2.14 36,192 2457 5.68 71% 58% 62% 77%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 78.41 27,192 473 78.39 1% 1% 100% 1%
Java 17.74 30,048 1282 69.90 98% 98% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Node.js 55.64 895,396 477 56.61 3% 52% 43% 5%
Java 11.52 643,924 889 40.54 89% 92% 85% 89%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 60.73 2,095,052 904 151.74 96% 84% 84% 83%
Java 8.02 467,004 1802 25.57 76% 98% 73% 74%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
Java 0.24 828 938 0.24 71% 38% 8% 4%
Node.js

v7.6.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)