The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
source secs KB gz cpu cpu load
Go 0.49 88,320 1278 0.84 30% 28% 98% 34%
Java 1.17 345,940 1661 2.42 41% 43% 57% 72%
fasta-redux
source secs KB gz cpu cpu load
Go 1.82 1,384 1237 1.82 1% 100% 1% 0%
Java 2.53 31,648 1443 2.59 3% 98% 1% 3%
mandelbrot
source secs KB gz cpu cpu load
Go 5.68 30,756 894 22.56 100% 100% 99% 99%
Java 7.14 88,236 796 27.93 97% 98% 98% 99%
fasta
source secs KB gz cpu cpu load
Go 1.97 3,456 1344 5.76 76% 71% 74% 73%
Java 2.20 37,072 2457 6.37 81% 68% 72% 72%
pidigits
source secs KB gz cpu cpu load
Go 2.80 11,352 685 2.80 47% 9% 1% 45%
Java 3.11 33,364 938 3.20 99% 2% 2% 2%
spectral-norm
source secs KB gz cpu cpu load
Go 3.97 2,140 536 15.73 99% 100% 99% 99%
Java 4.26 32,244 950 16.41 96% 98% 95% 97%
n-body
source secs KB gz cpu cpu load
Go 21.73 952 1310 21.73 0% 100% 1% 2%
Java 22.53 28,212 1430 22.54 100% 7% 1% 1%
fannkuch-redux
source secs KB gz cpu cpu load
Go 15.59 952 900 62.08 100% 100% 100% 100%
Java 13.65 31,996 1282 53.64 99% 98% 99% 98%
k-nucleotide
source secs KB gz cpu cpu load
Go 24.02 265,944 1090 73.42 94% 83% 65% 65%
Java 8.10 469,624 1802 25.75 97% 77% 76% 71%
binary-trees
source secs KB gz cpu cpu load
Go 39.88 361,208 688 152.12 96% 95% 96% 96%
Java 11.51 622,328 889 40.10 86% 86% 92% 87%
regex-dna
source secs KB gz cpu cpu load
Go 17.03 627,680 789 49.30 64% 64% 65% 99%
Java 4.56 667,820 1085 12.16 60% 66% 56% 87%
Go

go version go1.7 linux/amd64

Java

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