The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
source secs KB gz cpu cpu load
Go 1.01 133,360 1278 1.00 3% 1% 1% 99%
Java 1.79 521,988 745 1.78 1% 2% 2% 100%
regex-dna
source secs KB gz cpu cpu load
Go 8.14 503,992 1229 8.13 1% 1% 0% 100%
Java 11.41 699,176 1085 11.39 1% 1% 0% 100%
pidigits
source secs KB gz cpu cpu load
Go 3.86 8,032 729 3.85 2% 0% 0% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
n-body
source secs KB gz cpu cpu load
Go 23.18 928 1310 23.17 1% 0% 0% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Go 15.71 928 668 15.70 0% 1% 1% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
Go 27.17 34,800 894 27.16 0% 1% 1% 100%
Java 27.41 55,556 796 27.40 1% 0% 1% 100%
k-nucleotide
source secs KB gz cpu cpu load
Go 47.48 147,788 1582 47.45 1% 1% 0% 100%
Java 36.57 512,948 1802 36.54 1% 0% 0% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Go 94.45 924 900 94.42 0% 1% 1% 100%
Java 67.02 23,380 1257 67.00 0% 1% 1% 100%
fasta
source secs KB gz cpu cpu load
Go 10.29 988 1036 10.28 0% 1% 0% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Go 167.96 184,252 548 167.86 0% 1% 1% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
Go

go version go1.7 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)