The Computer Language
Benchmarks Game

Go versus Python 3 fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

n-body
source secs mem gz busy cpu load
Go 6.34 1,792 1200 6.44 1% 100% 0% 0%
Python 3 545.25 8,160 1196 558.88 1% 1% 1% 100%
spectral-norm
source secs mem gz busy cpu load
Go 1.43 2,668 548 5.70 99% 99% 99% 100%
Python 3 116.23 50,080 407 463.55 100% 100% 100% 100%
mandelbrot
source secs mem gz busy cpu load
Go 3.73 28,764 905 14.88 100% 99% 99% 100%
Python 3 170.25 47,568 688 680.12 100% 100% 100% 100%
fannkuch-redux
source secs mem gz busy cpu load
Go 8.51 2,732 969 34.00 100% 100% 100% 100%
Python 3 366.43 47,608 950 1,448.16 100% 99% 100% 97%
fasta
source secs mem gz busy cpu load
Go 1.20 11,452 1404 3.62 73% 70% 84% 74%
Python 3 38.07 845,888 1947 75.85 23% 63% 66% 47%
k-nucleotide
source secs mem gz busy cpu load
Go 8.03 150,544 1722 30.53 97% 96% 95% 92%
Python 3 48.51 134,372 1967 185.66 94% 100% 94% 95%
reverse-complement
source secs mem gz busy cpu load
Go 1.38 1,465,376 1338 2.54 51% 47% 38% 50%
Python 3 7.15 1,005,204 814 10.62 81% 1% 47% 20%
binary-trees
source secs mem gz busy cpu load
Go 12.36 396,032 1007 43.05 88% 86% 89% 85%
Python 3 48.45 448,980 589 171.58 86% 86% 87% 94%
pidigits
source secs mem gz busy cpu load
Go 1.23 8,580 603 1.26 1% 50% 2% 50%
Python 3 1.29 11,976 567 1.30 0% 100% 1% 0%
regex-redux
source secs mem gz busy cpu load
Go 3.57 382,828 810 5.71 21% 42% 47% 51%
Python 3 1.37 404,320 1403 2.65 32% 41% 33% 88%
Go

go version go1.14.4 linux/amd64

Python 3

Python 3.8.3