The Computer Language
Benchmarks Game

Go versus C gcc fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

pidigits
source secs mem gz busy cpu load
Go 2.04 8,724 603 2.36 20% 32% 33% 31%
C gcc 1.75 2,608 452 1.80 67% 0% 2% 33%
fasta
source secs mem gz busy cpu load
Go 2.11 4,228 1358 5.66 69% 65% 64% 70%
C gcc 1.46 2,948 2268 5.84 100% 99% 100% 99%
fannkuch-redux
source secs mem gz busy cpu load
Go 14.93 3,484 969 59.67 100% 100% 100% 100%
C gcc 8.73 696 910 34.46 100% 95% 100% 100%
reverse-complement
source secs mem gz busy cpu load
Go 3.73 826,488 611 4.10 88% 6% 2% 14%
C gcc 1.92 551,900 820 2.58 20% 99% 14% 1%
spectral-norm
source secs mem gz busy cpu load
Go 4.12 2,704 548 15.93 96% 98% 97% 96%
C gcc 1.98 988 569 7.89 99% 99% 100% 99%
k-nucleotide
source secs mem gz busy cpu load
Go 12.67 150,584 1722 47.44 95% 90% 93% 96%
C gcc 4.84 130,192 1506 16.00 98% 83% 63% 87%
n-body
source secs mem gz busy cpu load
Go 21.26 1,888 1310 22.28 3% 0% 100% 2%
C gcc 7.30 8 1391 7.41 0% 1% 100% 0%
mandelbrot
source secs mem gz busy cpu load
Go 5.55 30,300 894 22.11 99% 99% 99% 100%
C gcc 1.64 27,024 1135 6.53 99% 99% 100% 100%
regex-redux
source secs mem gz busy cpu load
Go 7.21 326,552 810 10.19 22% 18% 87% 14%
C gcc 1.42 152,192 1397 3.40 100% 48% 48% 44%
binary-trees
source secs mem gz busy cpu load
Go 25.19 397,116 1007 86.01 88% 86% 84% 83%
C gcc 3.59 168,896 809 11.86 77% 74% 98% 82%
Go

go version go1.14 linux/amd64

C gcc

gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0