The Computer Language
Benchmarks Game

Go programs versus Java

by benchmark task performance

reverse-complement
secs KB gz cpu cpu load
Go 0.99 133,872 1278 0.99 6% 0% 3% 100%
Java 1.80 522,620 745 1.80 3% 1% 1% 99%
pidigits
secs KB gz cpu cpu load
Go 3.28 9,052 685 3.27 0% 1% 1% 100%
Java 4.14 26,616 938 4.14 2% 0% 1% 100%
spectral-norm
secs KB gz cpu cpu load
Go 15.71 1,636 668 15.70 1% 86% 15% 100%
Java 16.37 26,876 950 16.36 1% 1% 0% 100%
mandelbrot
secs KB gz cpu cpu load
Go 27.18 34,688 894 27.17 0% 1% 1% 100%
Java 27.19 88,448 796 27.18 1% 0% 1% 100%
fasta-redux
secs KB gz cpu cpu load
Go 2.56 1,700 1237 2.56 2% 100% 2% 100%
Java 2.05 24,576 1443 2.04 1% 0% 0% 100%
fannkuch-redux
secs KB gz cpu cpu load
Go 94.55 968 900 94.50 0% 0% 0% 100%
Java 67.66 26,644 1282 67.63 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
Go 36.02 972 1310 36.00 1% 0% 0% 100%
Java 24.33 24,036 1424 24.32 1% 0% 0% 100%
fasta
secs KB gz cpu cpu load
Go 10.30 976 1036 10.29 1% 100% 1% 100%
Java 4.81 24,836 1507 4.80 1% 1% 0% 100%
k-nucleotide
secs KB gz cpu cpu load
Go 51.95 277,488 1268 51.91 0% 59% 42% 100%
Java 23.60 257,300 2568 23.58 0% 0% 1% 100%
regex-dna
secs KB gz cpu cpu load
Go 51.01 495,192 789 50.98 1% 100% 1% 100%
Java 20.80 567,404 1284 20.79 0% 0% 1% 100%
binary-trees
secs KB gz cpu cpu load
Go 141.10 140,104 548 141.00 1% 100% 1% 100%
Java 16.35 526,588 584 16.33 1% 1% 0% 100%
Go

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