The Computer Language
Benchmarks Game

Go programs versus Python 3

by benchmark task performance

fasta
source secs mem gz cpu cpu load
Go 2.17 3,584 1344 5.84 59% 78% 70% 64%
Python 3 110.91 8,024 977 110.87 100% 1% 1% 1%
mandelbrot
source secs mem gz cpu cpu load
Go 5.46 31,172 905 21.66 99% 100% 100% 99%
Python 3 273.43 53,416 686 1,091.35 100% 100% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Go 3.96 2,584 548 15.70 99% 99% 99% 99%
Python 3 188.83 54,524 437 750.46 99% 100% 100% 99%
n-body
source secs mem gz cpu cpu load
Go 21.47 1,560 1200 21.47 100% 0% 1% 1%
Python 3 787.02 7,744 1181 786.82 0% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Go 14.49 3,204 896 57.82 100% 100% 100% 100%
Python 3 483.79 51,896 944 1,880.10 97% 94% 100% 99%
reverse-complement
source secs mem gz cpu cpu load
Go 0.49 133,532 1278 0.87 76% 30% 27% 49%
Python 3 2.82 265,428 800 4.18 46% 32% 20% 54%
k-nucleotide
source secs mem gz cpu cpu load
Go 14.79 149,212 1713 53.03 88% 90% 96% 87%
Python 3 84.73 221,028 1937 276.97 97% 93% 91% 91%
binary-trees
source secs mem gz cpu cpu load
Go 35.18 277,864 660 132.94 96% 94% 94% 95%
Python 3 86.90 451,548 581 306.31 89% 97% 87% 89%
pidigits
source secs mem gz cpu cpu load
Go 2.02 10,744 603 2.02 2% 0% 5% 96%
Python 3 3.51 10,344 382 3.50 0% 2% 1% 100%
regex-redux
source secs mem gz cpu cpu load
Go 29.29 344,348 798 61.79 37% 59% 79% 38%
Python 3 14.86 439,208 486 27.92 46% 77% 35% 31%
Go

go version go1.9 linux/amd64

Python 3

Python 3.6.1 (default, Apr 18 2017, 10:33:41)
[GCC 6.3.0 20170406]
--enable-optimizations --with-lto
make profile-opt