The Computer Language
22.05 Benchmarks Game

Fastest cpu secs C# .NET versus C# pgo

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
C# pgo #8 33,148 1473 8.28
C# .NET #9 32,836 1225 34.63
C# pgo #9 32,836 1225 34.64
C# pgo #6 32,252 1068 39.23
C# .NET #6 32,152 1068 39.27
C# .NET #7   Bad Output  
C# pgo #7   Bad Output  
n-body
source mem gz cpu
C# pgo #9 33,656 2467 3.16
C# .NET #9 33,528 2467 3.17
C# pgo #4 33,436 2125 3.81
C# .NET #4 33,456 2125 3.83
C# .NET #7 33,644 1704 4.78
C# pgo #7 33,812 1704 4.78
C# pgo #6 33,780 1742 4.79
C# .NET #6 33,932 1742 4.80
C# pgo #3 33,964 1305 6.89
C# .NET #3 34,000 1305 6.90
C# .NET #2 33,984 1343 7.03
C# pgo #8 34,004 1332 7.03
C# .NET #8 33,996 1332 7.03
C# pgo #2 33,952 1343 7.03
spectral-norm
source mem gz cpu
C# .NET #5 35,524 764 2.97
C# pgo #5 35,756 764 2.98
C# .NET #3 33,368 878 5.78
C# pgo #3 33,404 878 5.79
mandelbrot
source mem gz cpu
C# pgo #9 67,100 816 12.16
C# .NET 66,656 1974 12.16
C# .NET #9 66,528 816 12.17
C# pgo 66,996 1974 12.17
C# pgo #5 65,356 839 16.15
C# .NET #5 64,376 839 16.15
pidigits
source mem gz cpu
C# pgo #6 33,840 1168 0.78
C# .NET #6 33,768 1168 0.78
C# .NET #5 35,888 977 0.83
C# pgo #5 36,160 977 0.83
C# pgo #4 33,060 1121 1.27
C# .NET #4 32,828 1121 1.27
C# .NET #7 53,276 567 8.41
C# pgo #7 52,956 567 8.41
regex-redux
source mem gz cpu
C# pgo #8 307,140 1869 2.65
C# .NET #8 319,484 1869 2.65
C# pgo #5 1,060,252 673 7.44
C# .NET #5 1,061,452 673 7.45
fasta
source mem gz cpu
C# pgo #5 91,696 1691 4.38
C# .NET #5 85,788 1691 4.43
C# pgo 51,324 2098 5.15
C# .NET 51,376 2098 5.16
k-nucleotide
source mem gz cpu
C# .NET 185,200 2044 10.97
C# pgo 185,404 2044 11.18
C# pgo #6 180,524 1603 15.73
C# .NET #6 180,876 1603 15.87
reverse-complement
source mem gz cpu
C# pgo #8 925,784 2637 1.22
C# .NET #8 930,564 2637 1.25
C# .NET #6 1,029,352 1621 3.79
C# pgo #6 1,029,188 1621 3.80
C# pgo #5 1,032,012 1613 4.01
C# .NET #5 1,032,176 1613 4.02
C# .NET #7 979,712 1310 5.13
C# pgo #7 976,924 1310 5.16
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# pgo #7 1,538,632 694 15.40
C# .NET #2 1,475,276 705 15.77
C# pgo #3 2,088,360 676 15.90
C# pgo 1,748,052 657 15.97
C# pgo #2 1,626,088 705 15.98
C# .NET 1,691,664 657 16.14
C# .NET

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

C# pgo

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