The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Go versus C# .NET

Always look at the source code.

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more cpu seconds, less gz source code.

fannkuch-redux
source mem gz cpu
C# .NET #8 33,148 1473 8.28
Go #3 2,260 969 32.88
C# .NET #9 32,836 1225 34.63
C# .NET #6 32,152 1068 39.27
Go 2,956 900 47.36
Go #2 11,316 896 47.56
C# .NET #7   Bad Output  
n-body
source mem gz cpu
C# .NET #9 33,528 2467 3.17
C# .NET #4 33,456 2125 3.83
C# .NET #7 33,644 1704 4.78
C# .NET #6 33,932 1742 4.80
Go #3 1,136 1200 6.38
Go 1,136 1310 6.58
C# .NET #3 34,000 1305 6.90
Go #2 1,132 1215 6.94
C# .NET #2 33,984 1343 7.03
C# .NET #8 33,996 1332 7.03
spectral-norm
source mem gz cpu
C# .NET #5 35,524 764 2.97
Go 2,452 411 5.33
Go #4 1,952 548 5.67
Go #2 1,420 668 5.68
C# .NET #3 33,368 878 5.78
mandelbrot
source mem gz cpu
C# .NET 66,656 1974 12.16
C# .NET #9 66,528 816 12.17
Go #4 33,812 905 14.85
Go #3 34,028 894 14.91
C# .NET #5 64,376 839 16.15
Go 32,600 823 19.58
Go #2 33,196 837 27.07
Go #6 32,764 700 27.25
pidigits
source mem gz cpu
C# .NET #6 33,768 1168 0.78
C# .NET #5 35,888 977 0.83
Go #4 8,732 683 0.87
Go #3 9,320 603 1.18
Go 9,496 708 1.21
C# .NET #4 32,828 1121 1.27
Go #2 9,032 733 1.59
Go #8 9,924 720 2.54
Go #7 8,620 696 5.05
C# .NET #7 53,276 567 8.41
regex-redux
source mem gz cpu
C# .NET #8 319,484 1869 2.65
Go #5 306,476 810 5.97
C# .NET #5 1,061,452 673 7.45
Go #4 355,844 829 34.99
Go #3 358,472 829 67.28
Go 297,048 741 68.45
fasta
source mem gz cpu
Go 1,112 1053 3.64
Go #2 10,980 1404 3.84
Go #3 3,168 1358 3.98
C# .NET #5 85,788 1691 4.43
C# .NET 51,376 2098 5.16
k-nucleotide
source mem gz cpu
C# .NET 185,200 2044 10.97
C# .NET #6 180,876 1603 15.87
Go #7 159,432 1607 28.49
Go #6 149,712 1590 29.40
Go #4 144,528 1543 30.22
Go #3 149,984 1722 30.25
reverse-complement
source mem gz cpu
C# .NET #8 930,564 2637 1.25
Go #2 826,796 611 1.94
Go #3 826,544 605 2.13
Go #5 1,483,756 996 2.26
Go #6 1,289,572 1338 2.48
C# .NET #6 1,029,352 1621 3.79
C# .NET #5 1,032,176 1613 4.02
C# .NET #7 979,712 1310 5.13
Go   Failed  
binary-trees
source mem gz cpu
C# .NET #7 1,609,712 694 15.29
C# .NET #3 1,964,552 676 15.35
C# .NET #2 1,475,276 705 15.77
C# .NET 1,691,664 657 16.14
Go #6 411,424 611 29.23
Go #2 632,396 666 48.67
Go #3 328,700 799 50.09
Go #5 394,800 950 50.52
Go 240,292 482 51.02
Go #7 259,088 525 51.41
Go

go version go1.18 linux/amd64

C# .NET

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