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.55 30,300 894 22.11 99% 99% 99% 100%
Python 3 263.87 48,268 688 1,054.07 100% 100% 100% 100%
n-body
source secs mem gz busy cpu load
Go 21.26 1,888 1310 22.28 3% 0% 100% 2%
Python 3 891.12 8,416 1196 924.03 1% 53% 47% 2%
spectral-norm
source secs mem gz busy cpu load
Go 4.12 2,704 548 15.93 96% 98% 97% 96%
Python 3 170.10 49,484 417 670.83 99% 98% 98% 99%
fannkuch-redux
source secs mem gz busy cpu load
Go 14.93 3,484 969 59.67 100% 100% 100% 100%
Python 3 494.58 47,432 950 1,956.79 98% 99% 98% 100%
fasta
source secs mem gz busy cpu load
Go 2.11 4,228 1358 5.66 69% 65% 64% 70%
Python 3 63.63 841,056 1947 127.80 58% 61% 44% 37%
k-nucleotide
source secs mem gz busy cpu load
Go 12.67 150,584 1722 47.44 95% 90% 93% 96%
Python 3 72.58 183,484 1967 276.33 95% 95% 94% 97%
reverse-complement
source secs mem gz busy cpu load
Go 3.73 826,488 611 4.10 88% 6% 2% 14%
Python 3 16.41 1,772,696 434 17.57 1% 78% 28% 0%
binary-trees
source secs mem gz busy cpu load
Go 25.19 397,116 1007 86.01 88% 86% 84% 83%
Python 3 80.82 448,104 589 288.23 91% 88% 91% 86%
pidigits
source secs mem gz busy cpu load
Go 2.04 8,724 603 2.36 20% 32% 33% 31%
Python 3 2.39 12,200 567 2.55 64% 37% 5% 1%
regex-redux
source secs mem gz busy cpu load
Go 7.21 326,552 810 10.19 22% 18% 87% 14%
Python 3 2.67 111,864 1403 4.86 87% 30% 29% 35%
Go

go version go1.14 linux/amd64

Python 3

Python 3.8.0