The Computer Language
22.01 Benchmarks Game

Go versus C# .NET fastest programs

Always look at the source code. These are only the fastest programs.

If they are manually vectorized SIMD, does the host language matter? You might not be interested in the most optimised programs.

Look at "mandelbrot" or "spectral-norm" or other measurement tables. Look at the other programs. Choose which programs you want to compare.

reverse-complement
source secs mem gz busy cpu load
Go 1.34 1,610,444 996 2.20 21% 99% 15% 30%
C# .NET 1.58 1,029,116 1621 3.88 30% 94% 66% 54%
fannkuch-redux
source secs mem gz busy cpu load
Go 8.31 2,272 969 33.19 100% 100% 100% 100%
C# .NET 8.74 31,712 1225 34.71 99% 99% 100% 99%
fasta
source secs mem gz busy cpu load
Go 1.27 11,520 1404 3.81 66% 84% 77% 74%
C# .NET 1.22 108,212 1691 4.45 93% 92% 91% 89%
pidigits
source secs mem gz busy cpu load
Go 0.86 9,188 683 0.90 99% 3% 1% 1%
C# .NET 0.79 33,196 1168 0.81 98% 4% 0% 1%
mandelbrot
source secs mem gz busy cpu load
Go 3.73 33,904 905 14.86 100% 99% 99% 100%
C# .NET 3.11 65,960 816 12.18 97% 99% 98% 97%
spectral-norm
source secs mem gz busy cpu load
Go 1.43 1,992 548 5.68 99% 99% 99% 100%
C# .NET 0.82 34,824 764 3.00 96% 90% 90% 91%
n-body
source secs mem gz busy cpu load
Go 6.37 1,160 1200 6.42 0% 0% 0% 100%
C# .NET 3.18 32,632 2467 3.23 2% 99% 0% 1%
k-nucleotide
source secs mem gz busy cpu load
Go 7.46 160,048 1607 28.57 96% 95% 95% 98%
C# .NET 3.21 184,240 2044 11.03 95% 89% 89% 70%
binary-trees
source secs mem gz busy cpu load
Go 12.48 659,828 666 49.71 100% 100% 100% 100%
C# .NET 4.90 1,651,992 705 15.90 77% 79% 79% 89%
regex-redux
source secs mem gz busy cpu load
Go 3.80 324,536 810 6.06 30% 19% 91% 20%
C# .NET 1.39 318,212 1869 2.63 50% 21% 88% 30%
Go

go version go1.17.6 linux/amd64

C# .NET

.NET SDK 6.0.101
Host Version: 6.0.1; Commit: 3a25a7f1cc
<ServerGarbageCollection>true</ServerGarbageCollection>