World Congress 2022 • Jun 15, 2022

Turbocharged: Writing High-Performance C# and .NET Code

Steve Gordon

Steve Gordon proves that optimizing C# hot paths directly slashes your cloud costs. Master Span<T>, pipelines, and rigorous benchmarking to eliminate expensive garbage collection overhead.

Pause
Mute Enter Fullscreen
#1 about 3 min

Core metrics for assessing code performance

Execution time, throughput, and memory allocations serve as the primary metrics for application performance.

#2 about 2 min

The fundamental cycle for code optimization

Accurately measuring and incrementally optimizing code prevents developers from making incorrect performance assumptions.

#3 about 3 min

Profiling tools and production data gathering

Diagnostic tools and production metrics reveal actual resource consumption to establish a baseline.

#4 about 3 min

Executing precision micro benchmarks with BenchmarkDotNet

Micro-benchmarking frameworks prevent statistical noise by validating execution performance over thousands of continuous iterations.

#5 about 3 min

Utilizing continuous memory views with span

Treating arrays as consistent continuous references circumvents the constraints surrounding direct memory allocation limits.

#6 about 6 min

Comparing slicing and array copying benchmarks

Slicing into pre-existing memory locations enables constant-time subset access without spawning duplicate objects.

#7 about 3 min

Overcoming the stack constraints with memory abstractions

Substituting spans with memory references enables the usage of asynchronous methods while preserving safety rules.

#8 about 5 min

Optimizing text parsing without surplus string allocations

Leveraging temporary stack buffers eliminates unnecessary garbage collection iterations during high-volume message ingestion.

#9 about 3 min

Reusing temporary buffers alongside the array pool

Renting standardized arrays across operations reduces heap churn associated with recurrent short-term variables.

#10 about 2 min

Amortizing input latency with pipeline data abstractions

Replacing conventional streams with standardized pipeline readers accelerates handling asynchronous data ingress operations.

#11 about 4 min

Transitioning stream processing to continuous pipeline workflows

Advancing the internal buffer position concurrently with decompression parsing reduces excessive memory utilization during concurrent executions.

#12 about 6 min

Justifying high performance optimizations to business leaders

Translating capability improvements into concrete structural hardware savings empowers leaders to endorse systemic codebase refactorings.

#13 about 4 min

Strategies for arrays and the value task struct

Adopting value tasks within mixed asynchronous scenarios mitigates the overhead of returning standard synchronous generic allocations.

Matching moments

1:55 min

Introduction to systems programming and performance in .NET

Szymon Kulec Szymon Kulec · World Congress 2026 Europe

8:29 min

Discussion on JIT memory parameters and cross-language benchmarking

Daniel Strmečki · LIVE

3:10 min

Debugging performance bottlenecks with developer tools

Cathrin Möller · World Congress 2023

3:37 min

Reviewing optimization improvements in Lighthouse

Laura Morinigo · World Congress 2022

4:47 min

Final performance results and key architectural takeaways

Yedidya Schwartz · LIVE

3:12 min

Prioritizing application startup efficiency over systemic throughput metrics

Holly Cummins · LIVE