The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
source secs KB gz cpu cpu load
Go 0.53 88,368 1278 0.94 28% 47% 77% 31%
Java 1.17 345,940 1661 2.42 41% 43% 57% 72%
fasta-redux
source secs KB gz cpu cpu load
Go 1.91 1,860 1236 1.90 1% 1% 100% 1%
Java 2.53 31,648 1443 2.59 3% 98% 1% 3%
mandelbrot
source secs KB gz cpu cpu load
Go 6.44 32,044 894 25.58 99% 100% 100% 100%
Java 7.14 88,236 796 27.93 97% 98% 98% 99%
pidigits
source secs KB gz cpu cpu load
Go 2.85 11,140 685 2.88 1% 35% 35% 32%
Java 3.11 33,364 938 3.20 99% 2% 2% 2%
spectral-norm
source secs KB gz cpu cpu load
Go 3.95 2,724 536 15.70 99% 99% 99% 100%
Java 4.26 32,244 950 16.41 96% 98% 95% 97%
n-body
source secs KB gz cpu cpu load
Go 22.00 1,948 1310 22.01 0% 1% 0% 100%
Java 22.53 28,212 1430 22.54 100% 7% 1% 1%
fasta
source secs KB gz cpu cpu load
Go 2.42 3,716 1344 6.32 78% 51% 69% 64%
Java 2.20 37,072 2457 6.37 81% 68% 72% 72%
fannkuch-redux
source secs KB gz cpu cpu load
Go 16.41 1,884 900 65.25 99% 100% 99% 100%
Java 13.65 31,996 1282 53.64 99% 98% 99% 98%
regex-dna
source secs KB gz cpu cpu load
Go 16.85 660,712 789 48.83 99% 64% 63% 64%
Java 8.23 753,008 929 24.56 71% 78% 81% 70%
k-nucleotide
source secs KB gz cpu cpu load
Go 42.59 266,232 1531 144.56 95% 68% 96% 82%
Java 12.87 462,488 1602 44.44 98% 81% 85% 82%
binary-trees
source secs KB gz cpu cpu load
Go 47.71 322,256 694 185.02 98% 97% 97% 97%
Java 11.51 622,328 889 40.10 86% 86% 92% 87%
Go

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