The Computer Language
Benchmarks Game

Go programs versus Python 3

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Go 3.94 2,320 548 15.69 99% 100% 100% 99%
Python 3 180.97 15,876 443 720.51 100% 100% 100% 100%
mandelbrot
source secs mem gz cpu cpu load
Go 5.48 30,704 905 21.74 100% 100% 99% 100%
Python 3 225.24 15,736 688 899.25 100% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Go 14.44 1,560 900 57.53 100% 100% 100% 100%
Python 3 565.97 15,528 950 2,172.63 95% 94% 95% 100%
n-body
source secs mem gz cpu cpu load
Go 21.47 1,568 1200 21.47 78% 1% 1% 22%
Python 3 838.39 10,324 1196 838.20 95% 1% 5% 0%
fasta
source secs mem gz cpu cpu load
Go 2.17 3,404 1358 5.83 58% 69% 66% 77%
Python 3 59.47 15,996 1947 138.97 55% 55% 63% 66%
reverse-complement
source secs mem gz cpu cpu load
Go 0.54 132,404 1338 0.91 25% 28% 58% 60%
Python 3 3.26 264,596 814 4.67 18% 99% 1% 26%
k-nucleotide
source secs mem gz cpu cpu load
Go 14.98 147,704 1722 55.60 97% 88% 92% 95%
Python 3 77.65 182,700 1967 302.86 97% 99% 97% 98%
binary-trees
source secs mem gz cpu cpu load
Go 34.42 268,188 654 130.26 96% 94% 95% 94%
Python 3 93.55 280,624 589 337.74 92% 89% 87% 93%
pidigits
source secs mem gz cpu cpu load
Go 2.03 9,428 603 2.03 0% 0% 0% 100%
Python 3 3.43 12,716 386 3.43 100% 1% 1% 0%
regex-redux
source secs mem gz cpu cpu load
Go 28.49 318,144 802 59.96 74% 48% 41% 48%
Python 3 15.22 447,324 512 27.44 25% 33% 32% 91%
Go

go version go1.9 linux/amd64

Python 3

Python 3.6.3