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.

fannkuch-redux
source secs mem gz busy cpu load
Go 7.59 2,064 969 30.31 100% 100% 100% 100%
C# .NET 8.40 30,848 1225 33.29 99% 100% 99% 99%
reverse-complement
source secs mem gz busy cpu load
Go 1.42 1,344,600 1338 2.66 57% 36% 71% 24%
C# .NET 1.50 950,648 1310 4.29 93% 63% 93% 38%
fasta
source secs mem gz busy cpu load
Go 1.28 11,276 1404 3.78 65% 86% 81% 65%
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,952 683 1.04 0% 3% 99% 2%
C# .NET 0.92 35,404 977 0.96 98% 3% 2% 1%
mandelbrot
source secs mem gz busy cpu load
Go 3.75 34,832 894 14.92 100% 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,896 1200 6.43 0% 100% 1% 0%
C# .NET 4.83 32,756 1704 4.85 0% 0% 0% 100%
spectral-norm
source secs mem gz busy cpu load
Go 1.44 2,356 548 5.71 99% 99% 99% 99%
C# .NET 0.82 35,048 764 2.99 89% 96% 89% 89%
k-nucleotide
source secs mem gz busy cpu load
Go 8.30 160,300 1607 31.96 96% 98% 96% 95%
C# .NET 3.29 182,860 2044 11.20 99% 86% 66% 90%
binary-trees
source secs mem gz busy cpu load
Go 12.80 385,036 1017 43.87 85% 87% 85% 86%
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.94 323,252 810 6.14 74% 30% 19% 33%
C# .NET 1.42 280,892 1869 2.69 30% 39% 86% 35%
Go

go version go1.16 linux/amd64

C# .NET

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