The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
secs KB gz cpu cpu load
Go 1.28 265,856 1243 1.54 12% 1% 100% 10%
Java 1.44 308,060 1661 2.91 47% 31% 85% 43%
fasta-redux
secs KB gz cpu cpu load
Go 1.77 1,724 1237 1.78 2% 100% 1% 2%
Java 1.93 24,588 1443 1.99 98% 2% 4% 3%
spectral-norm
secs KB gz cpu cpu load
Go 3.96 2,364 536 15.70 99% 99% 100% 99%
Java 4.30 26,476 950 16.53 99% 96% 95% 96%
mandelbrot
secs KB gz cpu cpu load
Go 6.84 32,568 894 27.18 99% 100% 100% 100%
Java 7.12 87,832 796 27.79 97% 99% 97% 97%
fannkuch-redux
secs KB gz cpu cpu load
Go 23.15 1,724 900 92.11 100% 100% 99% 100%
Java 17.13 25,804 1282 67.56 100% 98% 99% 98%
fasta
secs KB gz cpu cpu load
Go 2.47 3,496 1344 9.25 94% 96% 93% 94%
Java 1.82 31,600 2457 5.90 80% 83% 80% 82%
n-body
secs KB gz cpu cpu load
Go 36.01 1,608 1310 36.03 0% 69% 31% 1%
Java 24.31 24,156 1424 24.34 1% 1% 1% 100%
binary-trees
secs KB gz cpu cpu load
Go 8.95 100,584 752 18.25 53% 50% 50% 50%
Java 5.88 513,180 926 19.64 95% 79% 87% 76%
pidigits
secs KB gz cpu cpu load
Go 7.17 8,428 674 8.09 25% 31% 27% 31%
Java 4.07 26,324 938 4.17 3% 3% 4% 96%
k-nucleotide
secs KB gz cpu cpu load
Go 18.82 277,992 1268 49.83 38% 61% 83% 83%
Java 10.61 1,199,184 1844 35.27 79% 78% 90% 88%
regex-dna
secs KB gz cpu cpu load
Go 17.23 532,312 789 49.81 90% 64% 64% 72%
Java 8.80 729,244 929 25.79 77% 80% 72% 66%
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)