The Computer Language
Benchmarks Game

Go programs versus C gcc

by benchmark task performance

pidigits
source secs mem gz cpu cpu load
Go 2.02 9,256 603 2.02 0% 0% 100% 0%
C gcc 1.74 2,716 452 1.74 100% 1% 1% 2%
reverse-complement
source secs mem gz cpu cpu load
Go 0.63 89,120 1338 1.00 39% 43% 27% 57%
C gcc 0.48 200,492 820 0.66 4% 19% 25% 98%
fasta
source secs mem gz cpu cpu load
Go 2.08 3,640 1358 5.69 84% 66% 70% 56%
C gcc 1.32 2,912 2268 5.25 100% 99% 100% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Go 14.72 1,540 900 58.65 100% 100% 99% 100%
C gcc 8.66 980 910 34.22 100% 97% 100% 100%
k-nucleotide
source secs mem gz cpu cpu load
Go 12.72 148,012 1722 47.51 93% 96% 92% 92%
C gcc 6.67 130,160 1506 19.33 76% 50% 92% 75%
spectral-norm
source secs mem gz cpu cpu load
Go 3.94 2,344 548 15.71 100% 100% 100% 100%
C gcc 2.00 1,300 569 7.89 99% 99% 100% 99%
n-body
source secs mem gz cpu cpu load
Go 21.37 1,536 1310 21.38 0% 0% 100% 0%
C gcc 9.12 1,176 1490 9.12 1% 100% 2% 2%
mandelbrot
source secs mem gz cpu cpu load
Go 5.47 30,664 894 21.75 99% 99% 99% 100%
C gcc 1.64 29,424 1135 6.53 99% 100% 100% 100%
binary-trees
source secs mem gz cpu cpu load
Go 28.80 434,632 654 109.58 94% 95% 95% 97%
C gcc 2.44 133,956 836 7.57 80% 65% 68% 100%
regex-redux
source secs mem gz cpu cpu load
Go 28.21 323,820 802 59.87 69% 46% 50% 48%
C gcc 1.48 152,352 1230 4.05 59% 99% 57% 61%
Go

go version go1.10 linux/amd64

C gcc

gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0