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.

mandelbrot
source secs mem gz busy cpu load
Go 5.47 31,088 905 21.77 100% 99% 99% 99%
Python 3 259.50 48,192 688 1,036.70 100% 100% 100% 100%
spectral-norm
source secs mem gz busy cpu load
Go 3.96 2,752 548 15.74 99% 99% 99% 99%
Python 3 169.87 49,188 417 675.02 100% 99% 99% 99%
n-body
source secs mem gz busy cpu load
Go 21.25 1,588 1310 21.82 2% 0% 100% 1%
Python 3 865.18 8,176 1196 874.96 2% 20% 79% 0%
fannkuch-redux
source secs mem gz busy cpu load
Go 14.79 1,532 969 58.94 100% 100% 100% 100%
Python 3 534.40 47,236 950 2,104.05 99% 97% 99% 99%
fasta
source secs mem gz busy cpu load
Go 2.08 3,560 1358 5.61 80% 37% 76% 78%
Python 3 63.55 844,180 1947 129.71 40% 71% 33% 61%
k-nucleotide
source secs mem gz busy cpu load
Go 11.77 160,184 1607 44.52 94% 98% 94% 92%
Python 3 72.24 199,856 1967 275.38 94% 94% 96% 96%
reverse-complement
source secs mem gz busy cpu load
Go 3.83 1,782,940 1338 6.67 21% 74% 16% 62%
Python 3 16.93 1,777,852 434 17.58 78% 21% 4% 0%
binary-trees
source secs mem gz busy cpu load
Go 26.46 572,836 1007 89.76 86% 84% 85% 85%
Python 3 80.30 448,004 589 286.50 95% 87% 87% 88%
regex-redux
source secs mem gz busy cpu load
Go 6.84 340,376 810 9.43 30% 43% 13% 52%
Python 3 18.45 457,340 512 37.52 69% 37% 50% 48%
pidigits
source secs mem gz busy cpu load
Go 2.10 8,448 603 2.17 1% 48% 55% 0%
Python 3 3.47 10,356 386 3.53 1% 1% 0% 100%
Go

go version go1.13 linux/amd64

Python 3

Python 3.8.0