The Computer Language
Benchmarks Game

Go versus Java fastest programs

by faster benchmark performance

mandelbrot
source secs mem gz cpu cpu load
Go 5.47 31,004 905 21.73 100% 99% 99% 99%
Java 6.96 76,316 796 27.06 97% 97% 97% 97%
fasta
source secs mem gz cpu cpu load
Go 2.07 2,620 1358 5.86 84% 84% 61% 57%
Java 2.32 42,212 2473 6.30 65% 85% 47% 76%
spectral-norm
source secs mem gz cpu cpu load
Go 3.98 2,656 548 15.72 99% 99% 99% 99%
Java 4.26 33,572 950 16.39 96% 96% 98% 95%
pidigits
source secs mem gz cpu cpu load
Go 2.97 8,520 733 2.97 0% 1% 1% 100%
Java 3.13 37,364 938 3.36 99% 2% 3% 4%
n-body
source secs mem gz cpu cpu load
Go 21.00 1,536 1200 21.00 0% 100% 0% 1%
Java 22.00 32,272 1489 22.07 1% 0% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Go 17.82 1,472 900 71.02 100% 100% 100% 100%
Java 17.98 31,180 1282 70.57 97% 99% 97% 99%
reverse-complement
source secs mem gz cpu cpu load
Go 4.00 826,728 611 4.16 86% 1% 14% 6%
Java 3.32 609,712 2183 7.54 64% 44% 44% 76%
k-nucleotide
source secs mem gz cpu cpu load
Go 12.09 158,320 1607 45.00 94% 92% 95% 92%
Java 8.74 470,116 1812 27.12 71% 73% 93% 74%
regex-redux
source secs mem gz cpu cpu load
Go 28.99 338,504 802 60.81 54% 48% 68% 40%
Java 10.50 571,736 929 31.63 71% 73% 66% 92%
binary-trees
source secs mem gz cpu cpu load
Go 28.82 463,464 654 109.73 97% 95% 95% 94%
Java 8.39 960,056 835 27.39 81% 85% 74% 90%
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)