The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

pidigits
secs KB gz cpu cpu load
Go 2.88 5,132 685 2.88 1% 0% 2% 100%
Java 4.14 26,616 938 4.14 2% 0% 1% 100%
reverse-complement
secs KB gz cpu cpu load
Go 1.49 265,800 1243 1.49 0% 1% 1% 100%
Java 1.80 522,620 745 1.80 3% 1% 1% 99%
fasta-redux
secs KB gz cpu cpu load
Go 1.77 1,668 1237 1.77 1% 0% 1% 99%
Java 2.05 24,576 1443 2.04 1% 0% 0% 100%
spectral-norm
secs KB gz cpu cpu load
Go 15.71 1,668 668 15.70 1% 1% 0% 100%
Java 16.37 26,876 950 16.36 1% 1% 0% 100%
mandelbrot
secs KB gz cpu cpu load
Go 27.16 34,612 894 27.15 1% 1% 0% 100%
Java 27.19 88,448 796 27.18 1% 0% 1% 100%
fannkuch-redux
secs KB gz cpu cpu load
Go 92.20 1,720 900 92.16 1% 1% 0% 100%
Java 67.66 26,644 1282 67.63 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
Go 36.02 1,052 1310 36.00 0% 1% 1% 100%
Java 24.33 24,036 1424 24.32 1% 0% 0% 100%
binary-trees
secs KB gz cpu cpu load
Go 16.33 159,728 869 16.31 1% 0% 0% 100%
Java 10.70 518,220 926 10.68 1% 1% 0% 100%
k-nucleotide
secs KB gz cpu cpu load
Go 51.24 278,352 1268 51.20 0% 1% 1% 100%
Java 33.48 1,190,032 1844 33.44 1% 1% 0% 100%
fasta
secs KB gz cpu cpu load
Go 9.22 2,204 1344 9.22 0% 1% 0% 100%
Java 4.81 24,836 1507 4.80 1% 1% 0% 100%
regex-dna
secs KB gz cpu cpu load
Go 48.80 632,692 789 48.78 1% 1% 1% 100%
Java 20.80 567,404 1284 20.79 0% 0% 1% 100%
Go

go version go1.5 linux/386

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)