The Computer Language
Benchmarks Game

Python 3 programs versus Go

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Python 3 14.86 439,208 486 27.92 46% 77% 35% 31%
Go 29.51 352,804 798 61.51 77% 49% 43% 40%
binary-trees
source secs mem gz cpu cpu load
Python 3 86.90 451,548 581 306.31 89% 97% 87% 89%
Go 34.77 269,068 654 132.04 95% 97% 95% 95%
k-nucleotide
source secs mem gz cpu cpu load
Python 3 84.73 221,028 1937 276.97 97% 93% 91% 91%
Go 16.08 149,180 1582 59.44 95% 90% 90% 97%
reverse-complement
source secs mem gz cpu cpu load
Python 3 2.82 265,428 800 4.18 46% 32% 20% 54%
Go 0.49 88,056 1278 0.87 27% 43% 28% 81%
fannkuch-redux
source secs mem gz cpu cpu load
Python 3 483.79 51,896 944 1,880.10 97% 94% 100% 99%
Go 15.81 1,372 900 62.92 100% 100% 99% 99%
n-body
source secs mem gz cpu cpu load
Python 3 787.02 7,744 1181 786.82 0% 1% 0% 100%
Go 21.52 832 1310 21.52 1% 100% 0% 0%
spectral-norm
source secs mem gz cpu cpu load
Python 3 188.83 54,524 437 750.46 99% 100% 100% 99%
Go 3.96 2,148 548 15.71 100% 99% 99% 99%
mandelbrot
source secs mem gz cpu cpu load
Python 3 273.43 53,416 686 1,091.35 100% 100% 100% 100%
Go 5.64 31,312 894 22.41 99% 100% 99% 99%
fasta
source secs mem gz cpu cpu load
Python 3 110.91 8,024 977 110.87 100% 1% 1% 1%
Go 1.98 3,044 1344 5.65 75% 82% 47% 85%
pidigits
source secs mem gz cpu cpu load
Python 3   Failed
Go 0.13 ? 603 0.13 0% 0% 0% 100%
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

Go

go version go1.8.1 linux/amd64