The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
secs KB gz cpu cpu load
Go 0.84 259,504 1243 0.98 91% 1% 25% 1%
Java 1.27 315,296 1661 2.68 41% 48% 34% 92%
fasta-redux
secs KB gz cpu cpu load
Go 1.82 1,748 1236 1.82 0% 1% 100% 0%
Java 2.59 29,940 1443 2.65 1% 76% 1% 25%
k-nucleotide
secs KB gz cpu cpu load
Go 8.14 259,884 1399 29.97 91% 93% 93% 92%
Java 11.29 1,118,288 1844 38.66 83% 97% 82% 82%
pidigits
secs KB gz cpu cpu load
Go 2.51 7,868 685 2.50 0% 2% 100% 2%
Java 3.12 33,528 938 3.22 3% 2% 80% 21%
spectral-norm
secs KB gz cpu cpu load
Go 3.95 2,892 536 15.70 100% 99% 99% 99%
Java 4.28 32,696 950 16.53 96% 96% 96% 99%
fannkuch-redux
secs KB gz cpu cpu load
Go 16.38 1,788 900 65.12 100% 99% 99% 100%
Java 17.41 33,032 1282 68.64 98% 98% 99% 99%
n-body
secs KB gz cpu cpu load
Go 22.01 1,732 1310 22.02 0% 1% 100% 1%
Java 22.66 30,036 1424 22.68 97% 3% 0% 1%
mandelbrot
secs KB gz cpu cpu load
Go 6.44 32,184 894 25.59 100% 99% 99% 100%
Java 6.27 88,992 796 24.24 96% 97% 97% 98%
fasta
secs KB gz cpu cpu load
Go 2.33 3,956 1344 6.20 65% 57% 76% 69%
Java 2.19 39,368 2457 5.60 58% 72% 66% 61%
binary-trees
secs KB gz cpu cpu load
Go 10.82 282,052 869 28.01 70% 66% 77% 47%
Java 6.20 524,828 926 20.90 87% 91% 82% 80%
regex-dna
secs KB gz cpu cpu load
Go 16.97 474,400 789 49.05 68% 72% 76% 74%
Java 8.24 761,724 929 24.70 68% 73% 77% 83%
Go

go version go1.5 linux/amd64

Java

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