The Computer Language
22.01 Benchmarks Game

Go versus Python 3 fastest programs

Always look at the source code. These are only the fastest programs.

If they are manually vectorized SIMD, does the host language matter? You might not be interested in the most optimised programs.

Look at "mandelbrot" or "spectral-norm" or other measurement tables. Look at the other programs. Choose which programs you want to compare.

n-body
source secs mem gz busy cpu load
Go 6.37 1,160 1200 6.42 0% 0% 0% 100%
Python 3 541.34 7,780 1196 544.06 0% 100% 0% 0%
spectral-norm
source secs mem gz busy cpu load
Go 1.43 1,992 548 5.68 99% 99% 99% 100%
Python 3 112.97 48,792 407 450.01 100% 100% 100% 100%
mandelbrot
source secs mem gz busy cpu load
Go 3.73 33,904 905 14.86 100% 99% 99% 100%
Python 3 177.35 47,780 688 703.41 99% 99% 99% 99%
fannkuch-redux
source secs mem gz busy cpu load
Go 8.31 2,272 969 33.19 100% 100% 100% 100%
Python 3 341.45 45,548 950 1,347.78 100% 99% 96% 99%
fasta
source secs mem gz busy cpu load
Go 1.27 11,520 1404 3.81 66% 84% 77% 74%
Python 3 36.90 836,484 1947 68.94 43% 10% 74% 60%
k-nucleotide
source secs mem gz busy cpu load
Go 7.46 160,048 1607 28.57 96% 95% 95% 98%
Python 3 46.31 246,576 1967 175.36 94% 95% 96% 94%
reverse-complement
source secs mem gz busy cpu load
Go 1.34 1,610,444 996 2.20 21% 99% 15% 30%
Python 3 6.62 1,005,400 814 10.00 3% 48% 72% 28%
binary-trees
source secs mem gz busy cpu load
Go 12.48 659,828 666 49.71 100% 100% 100% 100%
Python 3 44.70 273,136 660 161.37 83% 90% 91% 97%
pidigits
source secs mem gz busy cpu load
Go 0.86 9,188 683 0.90 99% 3% 1% 1%
Python 3 1.16 11,700 567 1.19 1% 100% 1% 1%
regex-redux
source secs mem gz busy cpu load
Go 3.80 324,536 810 6.06 30% 19% 91% 20%
Python 3 1.34 111,492 1403 2.62 36% 41% 32% 87%
Go

go version go1.17.6 linux/amd64

Python 3

Python 3.10.1