The Computer Language
Benchmarks Game

Go programs versus C gcc

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Go 0.49 133,532 1278 0.87 76% 30% 27% 49%
C gcc 0.42 143,948 812 0.58 15% 26% 98% 2%
pidigits
source secs mem gz cpu cpu load
Go 2.02 10,744 603 2.02 2% 0% 5% 96%
C gcc 1.73 2,116 448 1.73 1% 99% 1% 0%
fannkuch-redux
source secs mem gz cpu cpu load
Go 14.49 3,204 896 57.82 100% 100% 100% 100%
C gcc 8.97 1,660 910 35.00 98% 94% 99% 100%
fasta
source secs mem gz cpu cpu load
Go 2.17 3,584 1344 5.84 59% 78% 70% 64%
C gcc 1.33 2,856 2249 5.28 100% 99% 100% 99%
spectral-norm
source secs mem gz cpu cpu load
Go 3.96 2,584 548 15.70 99% 99% 99% 99%
C gcc 1.99 1,824 1139 7.88 99% 99% 99% 100%
n-body
source secs mem gz cpu cpu load
Go 21.47 1,560 1200 21.47 100% 0% 1% 1%
C gcc 9.96 1,016 1490 9.95 1% 1% 1% 100%
k-nucleotide
source secs mem gz cpu cpu load
Go 14.79 149,212 1713 53.03 88% 90% 96% 87%
C gcc 5.38 129,772 1499 16.37 61% 82% 89% 74%
mandelbrot
source secs mem gz cpu cpu load
Go 5.46 31,172 905 21.66 99% 100% 100% 99%
C gcc 1.65 32,684 1135 6.53 99% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Go 35.18 277,864 660 132.94 96% 94% 94% 95%
C gcc 2.38 131,728 836 7.70 98% 87% 73% 68%
regex-redux
source secs mem gz cpu cpu load
Go 29.29 344,348 798 61.79 37% 59% 79% 38%
C gcc 1.45 155,768 1230 4.03 61% 64% 56% 100%
Go

go version go1.9 linux/amd64

C gcc

gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406