The Computer Language
Benchmarks Game

JavaScript V8 programs versus Java

by benchmark task performance

regex-dna
secs KB gz cpu cpu load
JavaScript V8 3.55 432,072 405 3.54 1% 0% 1% 100%
Java 20.80 567,404 1284 20.79 0% 0% 1% 100%
spectral-norm
secs KB gz cpu cpu load
JavaScript V8 15.72 14,264 361 15.71 0% 1% 0% 100%
Java 16.37 26,876 950 16.36 1% 1% 0% 100%
fannkuch-redux
secs KB gz cpu cpu load
JavaScript V8 71.39 10,572 539 71.36 1% 0% 0% 100%
Java 67.66 26,644 1282 67.63 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
JavaScript V8 43.01 13,108 1287 42.99 1% 0% 0% 100%
Java 24.33 24,036 1424 24.32 1% 0% 0% 100%
k-nucleotide
secs KB gz cpu cpu load
JavaScript V8 120.54 25,248 1249 120.41 1% 1% 1% 100%
Java 33.48 1,190,032 1844 33.44 1% 1% 0% 100%
binary-trees
secs KB gz cpu cpu load
JavaScript V8 41.55 467,564 467 41.49 0% 0% 1% 100%
Java 10.70 518,220 926 10.68 1% 1% 0% 100%
reverse-complement
secs KB gz cpu cpu load
JavaScript V8 7.39 268,372 787 7.38 1% 3% 4% 100%
Java 1.80 522,620 745 1.80 3% 1% 1% 99%
fasta
secs KB gz cpu cpu load
JavaScript V8 22.95 33,720 956 22.92 0% 1% 1% 100%
Java 4.81 24,836 1507 4.80 1% 1% 0% 100%
fasta-redux
secs KB gz cpu cpu load
  No program contribute your program
Java 0.22 476 1443 0.21 0% 5% 0% 100%
pidigits
secs KB gz cpu cpu load
  No program contribute your program
Java 0.36 456 938 0.35 3% 0% 3% 100%
mandelbrot
secs KB gz cpu cpu load
JavaScript V8   Bad Output
Java 0.30 472 796 0.30 9% 0% 0% 100%
JavaScript V8

V8 version 4.6.0 (candidate) [console: dumb]

Java

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Server VM (build 25.45-b02, mixed mode)