The Computer Language
Benchmarks Game

Go versus C# .NET 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.

reverse-complement
source secs mem gz busy cpu load
Go 1.35 1,560,228 996 2.24 24% 35% 10% 99%
C# .NET 1.50 950,648 1310 4.29 93% 63% 93% 38%
fannkuch-redux
source secs mem gz busy cpu load
Go 8.31 2,316 969 33.23 100% 100% 100% 100%
C# .NET 8.40 30,848 1225 33.29 99% 100% 99% 99%
fasta
source secs mem gz busy cpu load
Go 1.26 11,480 1404 3.89 79% 89% 70% 71%
C# .NET 1.21 152,684 1691 4.58 96% 97% 92% 93%
pidigits
source secs mem gz busy cpu load
Go 1.00 8,808 683 1.03 2% 1% 45% 55%
C# .NET 0.92 35,404 977 0.96 98% 3% 2% 1%
mandelbrot
source secs mem gz busy cpu load
Go 3.73 34,192 905 14.85 99% 99% 99% 100%
C# .NET 3.14 64,940 1974 12.30 99% 98% 97% 97%
n-body
source secs mem gz busy cpu load
Go 6.38 1,604 1200 6.42 0% 100% 0% 0%
C# .NET 3.84 32,788 2125 4.09 1% 4% 99% 2%
spectral-norm
source secs mem gz busy cpu load
Go 1.43 2,208 548 5.68 99% 99% 100% 99%
C# .NET 0.82 35,048 764 2.99 89% 96% 89% 89%
k-nucleotide
source secs mem gz busy cpu load
Go 7.46 160,328 1607 28.71 98% 95% 95% 97%
C# .NET 3.29 182,860 2044 11.20 99% 86% 66% 90%
binary-trees
source secs mem gz busy cpu load
Go 12.23 392,744 1017 41.62 83% 87% 85% 85%
C# .NET 4.81 1,881,564 676 15.47 81% 74% 83% 83%
regex-redux
source secs mem gz busy cpu load
Go 3.85 324,200 810 6.01 27% 19% 20% 91%
C# .NET 1.42 280,892 1869 2.69 30% 39% 86% 35%
Go

go version go1.17 linux/amd64

C# .NET

.NET SDK 5.0.201
Host Version: 5.0.4; Commit: f27d337295
<ServerGarbageCollection>true</ServerGarbageCollection>