The Computer Language
Benchmarks Game

Go versus Python 3 fastest programs

by faster benchmark performance

mandelbrot
source secs mem gz cpu cpu load
Go 5.47 31,004 905 21.73 100% 99% 99% 99%
Python 3 263.04 51,780 688 1,050.80 100% 100% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Go 3.98 2,656 548 15.72 99% 99% 99% 99%
Python 3 182.12 52,752 443 705.87 96% 96% 96% 100%
n-body
source secs mem gz cpu cpu load
Go 21.00 1,536 1200 21.00 0% 100% 0% 1%
Python 3 850.24 7,916 1242 850.06 0% 0% 0% 100%
fasta
source secs mem gz cpu cpu load
Go 2.07 2,620 1358 5.86 84% 84% 61% 57%
Python 3 63.19 680,688 1947 135.52 62% 70% 63% 22%
fannkuch-redux
source secs mem gz cpu cpu load
Go 17.82 1,472 900 71.02 100% 100% 100% 100%
Python 3 507.56 50,988 950 1,998.88 99% 99% 97% 99%
k-nucleotide
source secs mem gz cpu cpu load
Go 12.09 158,320 1607 45.00 94% 92% 95% 92%
Python 3 72.80 189,720 1967 276.09 95% 96% 98% 94%
reverse-complement
source secs mem gz cpu cpu load
Go 4.00 826,728 611 4.16 86% 1% 14% 6%
Python 3 16.03 1,007,016 814 19.29 18% 59% 44% 23%
binary-trees
source secs mem gz cpu cpu load
Go 28.82 463,464 654 109.73 97% 95% 95% 94%
Python 3 83.95 451,732 589 290.57 88% 87% 87% 97%
pidigits
source secs mem gz cpu cpu load
Go 2.97 8,520 733 2.97 0% 1% 1% 100%
Python 3 3.47 10,364 386 3.47 0% 1% 100% 0%
regex-redux
source secs mem gz cpu cpu load
Go 28.99 338,504 802 60.81 54% 48% 68% 40%
Python 3 16.98 445,760 512 31.44 28% 74% 47% 38%
Go

go version go1.11 linux/amd64

Python 3

Python 3.7.1