C#
C# on .NET (CoreCLR): compiled to IL, then tiered JIT-compiled with dynamic PGO, with a generational garbage collector.
dotnet.microsoft.com ↗- Overall speed rank
- -
- no data yet
- Latest release
- 11.0
- 6 tracked releases since 2021
- Strongest on
- -
- Weakest on
- -
Performance by problem
Newest release (11.0), default build (dotnet build -c Release). The index is how many times slower this language is than the fastest entry on that problem (1.00× = fastest); rank is among all languages.
The first scheduled GitHub Actions run will publish real measurements here. Everything on this page is computed from raw iterations in data/.
Build settings
dotnet build -c Release default
Release build, default runtime settings (tiered compilation, dynamic PGO, concurrent workstation GC).
export DOTNET_CLI_TELEMETRY_OPTOUT=1 DOTNET_NOLOGO=1; P={bin}.proj; mkdir -p $P && cp {harness}/Harness.cs $P/ && cp {src}/Program.cs $P/Problem.cs && sed "s/@TFM@/net$(dotnet --version | cut -d. -f1,2)/" /repo/languages/csharp/app.csproj > $P/app.csproj && cd $P && dotnet build -c Release -o {bin} -v q -nologodotnet {bin}/app.dllDOTNET_TieredCompilation=0
Every method is fully optimised on its first call: slower start-up, no tier-0 phase.
export DOTNET_CLI_TELEMETRY_OPTOUT=1 DOTNET_NOLOGO=1; P={bin}.proj; mkdir -p $P && cp {harness}/Harness.cs $P/ && cp {src}/Program.cs $P/Problem.cs && sed "s/@TFM@/net$(dotnet --version | cut -d. -f1,2)/" /repo/languages/csharp/app.csproj > $P/app.csproj && cd $P && dotnet build -c Release -o {bin} -v q -nologoDOTNET_TieredCompilation=0 dotnet {bin}/app.dllEvery release (default build)
The first scheduled GitHub Actions run will publish real measurements here. Everything on this page is computed from raw iterations in data/.
Speed across releases
Did C# get faster? Every tracked release plotted at its release date, one line per build setting. Shows time, memory or binary size over all problems by default.
The first scheduled GitHub Actions run will publish real measurements here. Everything on this page is computed from raw iterations in data/.
Release highlights
- C# 11.0 2026-10-21
- C# 10.0 2025-11-11Long-term support release · Better JIT inlining and object stack allocation
- C# 9.0 2024-11-12Dynamic GC adaptation · LINQ and collection performance work
- C# 8.0 2023-11-14Long-term support release · Dynamic PGO enabled by default
- C# 7.0 2022-10-18
- C# 6.0 2021-10-22
Badge
Show this language's overall rank in your README or website:
[](https://stijnris.github.io/language-bench/languages/csharp/)<a href="https://stijnris.github.io/language-bench/languages/csharp/"><img src="https://stijnris.github.io/language-bench/badges/csharp.svg" alt="C# on language-bench"></a>