The Computer Language
Benchmarks Game

Go versus Java fastest programs

by faster benchmark performance

pidigits
source secs mem gz cpu cpu load
Go 2.02 9,256 603 2.02 0% 0% 100% 0%
Java 3.14 37,080 938 3.35 4% 4% 1% 98%
fannkuch-redux
source secs mem gz cpu cpu load
Go 14.72 1,540 900 58.65 100% 100% 99% 100%
Java 17.74 31,900 1282 69.78 99% 98% 99% 98%
mandelbrot
source secs mem gz cpu cpu load
Go 5.48 30,912 905 21.79 99% 99% 99% 100%
Java 6.13 76,876 796 23.60 96% 96% 96% 97%
spectral-norm
source secs mem gz cpu cpu load
Go 3.94 2,344 548 15.71 100% 100% 100% 100%
Java 4.41 35,028 950 16.79 96% 97% 98% 95%
fasta
source secs mem gz cpu cpu load
Go 2.08 3,640 1358 5.69 84% 66% 70% 56%
Java 2.29 43,724 2473 6.16 67% 76% 59% 70%
n-body
source secs mem gz cpu cpu load
Go 21.37 1,536 1310 21.38 0% 0% 100% 0%
Java 22.17 33,128 1489 22.26 0% 100% 2% 0%
reverse-complement
source secs mem gz cpu cpu load
Go 4.00 824,356 611 4.16 1% 35% 68% 2%
Java 3.18 672,272 2183 7.17 67% 46% 43% 77%
k-nucleotide
source secs mem gz cpu cpu load
Go 12.77 148,052 1722 47.35 87% 97% 94% 95%
Java 8.66 384,756 1812 26.91 69% 88% 81% 75%
regex-redux
source secs mem gz cpu cpu load
Go 28.21 323,820 802 59.87 69% 46% 50% 48%
Java 10.43 609,920 929 31.73 72% 78% 72% 83%
binary-trees
source secs mem gz cpu cpu load
Go 28.80 434,632 654 109.58 94% 95% 95% 97%
Java 8.29 930,040 835 28.13 78% 94% 85% 86%
Go

go version go1.10 linux/amd64

Java

java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)