The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
secs KB gz cpu cpu load
Go 0.88 259,460 1243 0.88 0% 2% 4% 100%
Java 1.70 474,400 745 1.70 1% 1% 3% 99%
fasta-redux
secs KB gz cpu cpu load
Go 1.83 1,748 1236 1.82 1% 1% 1% 100%
Java 2.64 30,364 1443 2.63 2% 1% 1% 100%
k-nucleotide
secs KB gz cpu cpu load
Go 30.07 260,220 1399 30.04 1% 0% 0% 100%
Java 34.83 1,124,104 1844 34.79 1% 1% 0% 100%
fannkuch-redux
secs KB gz cpu cpu load
Go 65.19 1,788 900 65.17 1% 1% 0% 100%
Java 69.27 47,784 1282 69.25 1% 0% 0% 100%
spectral-norm
secs KB gz cpu cpu load
Go 15.70 2,644 411 15.70 1% 0% 0% 100%
Java 16.22 32,332 950 16.22 0% 1% 1% 100%
n-body
secs KB gz cpu cpu load
Go 22.01 1,732 1310 22.00 0% 1% 0% 100%
Java 22.68 30,056 1424 22.67 0% 0% 1% 100%
pidigits
secs KB gz cpu cpu load
Go 3.36 13,052 674 3.35 1% 1% 0% 100%
Java 3.20 33,052 938 3.20 1% 1% 1% 100%
mandelbrot
secs KB gz cpu cpu load
Go 25.57 34,064 894 25.56 1% 0% 0% 100%
Java 23.93 91,684 796 23.92 1% 1% 1% 100%
fasta
secs KB gz cpu cpu load
Go 6.09 2,912 1344 6.08 0% 1% 1% 100%
Java 5.15 31,376 1507 5.14 1% 1% 0% 100%
regex-dna
secs KB gz cpu cpu load
Go 48.48 619,976 789 48.46 0% 1% 0% 100%
Java 21.40 575,372 1284 21.39 1% 0% 1% 100%
binary-trees
secs KB gz cpu cpu load
Go 17.36 221,460 752 17.29 0% 0% 1% 100%
Java 7.39 414,024 583 7.38 1% 1% 1% 100%
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)