The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
secs KB gz cpu cpu load
Go 0.53 88,368 1278 0.94 28% 47% 77% 31%
Java 1.27 315,296 1661 2.68 41% 48% 34% 92%
fasta-redux
secs KB gz cpu cpu load
Go 1.91 1,860 1236 1.90 1% 1% 100% 1%
Java 2.59 29,940 1443 2.65 1% 76% 1% 25%
pidigits
secs KB gz cpu cpu load
Go 2.85 11,140 685 2.88 1% 35% 35% 32%
Java 3.12 33,528 938 3.22 3% 2% 80% 21%
spectral-norm
secs KB gz cpu cpu load
Go 3.95 2,724 536 15.70 99% 99% 99% 100%
Java 4.28 32,696 950 16.53 96% 96% 96% 99%
fannkuch-redux
secs KB gz cpu cpu load
Go 16.41 1,884 900 65.25 99% 100% 99% 100%
Java 17.41 33,032 1282 68.64 98% 98% 99% 99%
n-body
secs KB gz cpu cpu load
Go 22.00 1,948 1310 22.01 0% 1% 0% 100%
Java 22.66 30,036 1424 22.68 97% 3% 0% 1%
mandelbrot
secs KB gz cpu cpu load
Go 6.44 32,044 894 25.58 99% 100% 100% 100%
Java 6.27 88,992 796 24.24 96% 97% 97% 98%
fasta
secs KB gz cpu cpu load
Go 2.42 3,716 1344 6.32 78% 51% 69% 64%
Java 2.19 39,368 2457 5.60 58% 72% 66% 61%
k-nucleotide
secs KB gz cpu cpu load
Go 8.16 259,760 1399 30.33 93% 91% 98% 91%
Java 6.60 263,468 2568 20.56 76% 76% 90% 70%
regex-dna
secs KB gz cpu cpu load
Go 16.85 660,712 789 48.83 99% 64% 63% 64%
Java 8.24 761,724 929 24.70 68% 73% 77% 83%
binary-trees
secs KB gz cpu cpu load
Go 47.71 322,256 694 185.02 98% 97% 97% 97%
Java 11.58 649,456 889 40.18 94% 85% 87% 83%
Go

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