The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
source secs KB gz cpu cpu load
Go 0.99 133,872 1278 0.99 6% 0% 3% 100%
Java 1.79 521,988 745 1.78 1% 2% 2% 100%
pidigits
source secs KB gz cpu cpu load
Go 3.28 9,052 685 3.27 0% 1% 1% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
spectral-norm
source secs KB gz cpu cpu load
Go 15.71 1,636 668 15.70 1% 86% 15% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
Go 27.18 34,688 894 27.17 0% 1% 1% 100%
Java 27.41 55,556 796 27.40 1% 0% 1% 100%
fasta-redux
source secs KB gz cpu cpu load
Go 2.56 1,700 1237 2.56 2% 100% 2% 100%
Java 1.89 23,120 1443 1.88 2% 2% 0% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Go 94.55 968 900 94.50 0% 0% 0% 100%
Java 67.56 23,480 1282 67.53 1% 1% 1% 100%
n-body
source secs KB gz cpu cpu load
Go 36.02 972 1310 36.00 1% 0% 0% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
fasta
source secs KB gz cpu cpu load
Go 10.30 976 1036 10.29 1% 100% 1% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
Go 51.01 495,192 789 50.98 1% 100% 1% 100%
Java 22.35 623,244 740 22.34 1% 1% 0% 100%
k-nucleotide
source secs KB gz cpu cpu load
Go 131.68 277,064 1531 131.58 1% 64% 37% 100%
Java 47.14 516,280 1602 47.10 1% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Go 141.10 140,104 548 141.00 1% 100% 1% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
Go

go version go1.6 linux/386

Java

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