The Computer Language
Benchmarks Game

Go versus C gcc fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

fannkuch-redux
source secs mem gz busy cpu load
Go 8.31 2,316 969 33.23 100% 100% 100% 100%
C gcc 7.58 872 910 29.61 100% 98% 99% 93%
reverse-complement
source secs mem gz busy cpu load
Go 1.35 1,560,228 996 2.24 24% 35% 10% 99%
C gcc 0.86 712,208 820 1.27 99% 28% 1% 19%
fasta
source secs mem gz busy cpu load
Go 1.26 11,480 1404 3.89 79% 89% 70% 71%
C gcc 0.78 1,156 1463 0.78 0% 0% 0% 100%
pidigits
source secs mem gz busy cpu load
Go 1.00 8,808 683 1.03 2% 1% 45% 55%
C gcc 0.59 2,444 1090 2.37 100% 100% 100% 98%
k-nucleotide
source secs mem gz busy cpu load
Go 7.46 160,328 1607 28.71 98% 95% 95% 97%
C gcc 3.72 130,260 1506 12.07 100% 89% 78% 57%
n-body
source secs mem gz busy cpu load
Go 6.38 1,604 1200 6.42 0% 100% 0% 0%
C gcc 2.18 768 1633 2.19 0% 100% 0% 0%
mandelbrot
source secs mem gz busy cpu load
Go 3.73 34,192 905 14.85 99% 99% 99% 100%
C gcc 1.27 31,792 1135 5.08 100% 100% 99% 100%
spectral-norm
source secs mem gz busy cpu load
Go 1.43 2,208 548 5.68 99% 99% 100% 99%
C gcc 0.40 872 1197 1.58 100% 100% 100% 98%
regex-redux
source secs mem gz busy cpu load
Go 3.85 324,200 810 6.01 27% 19% 20% 91%
C gcc 0.80 152,172 1397 2.01 52% 99% 48% 53%
binary-trees
source secs mem gz busy cpu load
Go 12.23 392,744 1017 41.62 83% 87% 85% 85%
C gcc 1.54 168,832 809 4.35 60% 67% 57% 100%
Go

go version go1.17 linux/amd64

C gcc

gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0