The Computer Language
Benchmarks Game

Python 3 programs versus Go

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Python 3 15.22 447,324 512 27.44 25% 33% 32% 91%
Go 28.21 323,820 802 59.87 69% 46% 50% 48%
pidigits
source secs mem gz cpu cpu load
Python 3 3.43 12,716 386 3.43 100% 1% 1% 0%
Go 2.02 9,256 603 2.02 0% 0% 100% 0%
binary-trees
source secs mem gz cpu cpu load
Python 3 93.55 280,624 589 337.74 92% 89% 87% 93%
Go 28.80 434,632 654 109.58 94% 95% 95% 97%
reverse-complement
source secs mem gz cpu cpu load
Python 3 18.79 1,008,868 814 19.73 9% 69% 35% 30%
Go 4.00 824,356 611 4.16 1% 35% 68% 2%
k-nucleotide
source secs mem gz cpu cpu load
Python 3 77.65 182,700 1967 302.86 97% 99% 97% 98%
Go 12.77 148,052 1722 47.35 87% 97% 94% 95%
fasta
source secs mem gz cpu cpu load
Python 3 59.47 15,996 1947 138.97 55% 55% 63% 66%
Go 2.08 3,640 1358 5.69 84% 66% 70% 56%
fannkuch-redux
source secs mem gz cpu cpu load
Python 3 565.97 15,528 950 2,172.63 95% 94% 95% 100%
Go 14.72 1,540 900 58.65 100% 100% 99% 100%
n-body
source secs mem gz cpu cpu load
Python 3 838.39 10,324 1196 838.20 95% 1% 5% 0%
Go 21.37 1,536 1310 21.38 0% 0% 100% 0%
mandelbrot
source secs mem gz cpu cpu load
Python 3 225.24 15,736 688 899.25 100% 100% 100% 100%
Go 5.48 30,912 905 21.79 99% 99% 99% 100%
spectral-norm
source secs mem gz cpu cpu load
Python 3 180.97 15,876 443 720.51 100% 100% 100% 100%
Go 3.94 2,344 548 15.71 100% 100% 100% 100%
Python 3

Python 3.6.3

Go

go version go1.10 linux/amd64