The Computer Language
Benchmarks Game

Go versus Java fastest programs

by faster benchmark performance

pidigits
source secs mem gz cpu cpu load
Go 2.04 8,964 603 2.04 0% 83% 18% 0%
Java 3.13 37,324 938 3.35 98% 5% 3% 3%
mandelbrot
source secs mem gz cpu cpu load
Go 5.47 31,040 905 21.73 99% 99% 100% 99%
Java 6.96 76,748 796 27.07 98% 98% 96% 98%
fasta
source secs mem gz cpu cpu load
Go 2.06 3,432 1358 5.85 87% 30% 84% 84%
Java 2.32 42,556 2473 6.24 73% 85% 49% 63%
spectral-norm
source secs mem gz cpu cpu load
Go 3.95 2,664 548 15.70 99% 99% 100% 100%
Java 4.27 32,960 950 16.41 95% 97% 98% 96%
n-body
source secs mem gz cpu cpu load
Go 21.00 1,536 1200 21.00 100% 0% 0% 1%
Java 22.00 32,496 1489 22.07 1% 100% 0% 1%
fannkuch-redux
source secs mem gz cpu cpu load
Go 17.83 1,480 900 71.04 100% 100% 100% 100%
Java 17.91 31,560 1282 70.25 99% 98% 99% 97%
reverse-complement
source secs mem gz cpu cpu load
Go 4.00 826,668 611 4.15 4% 15% 4% 85%
Java 3.29 724,008 2183 7.40 85% 57% 45% 42%
k-nucleotide
source secs mem gz cpu cpu load
Go 13.06 148,316 1722 47.92 90% 89% 95% 93%
Java 8.66 385,768 1812 26.52 76% 81% 74% 76%
regex-redux
source secs mem gz cpu cpu load
Go 28.89 338,812 802 60.70 41% 51% 48% 70%
Java 10.52 637,380 929 31.89 75% 80% 77% 72%
binary-trees
source secs mem gz cpu cpu load
Go 28.56 466,636 654 109.05 96% 95% 96% 95%
Java 8.28 982,224 835 27.19 79% 86% 83% 83%
Go

go version go1.11 linux/amd64

Java

openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)