Performance of C# (.NET) Applications
Performance of C# (.NET) Applications
Summary:
The book «Performance of C# (.NET) Applications» is a practical guide for developers striving to create fast, responsive, and scalable applications on the .NET platform. In today's world, where every millisecond counts, knowledge of performance nuances becomes a mandatory skill for a senior developer.
What is this book about?
The author systematically covers the full cycle of performance work: from identifying bottlenecks to implementing effective solutions. You will learn:
- Profiling basics — how to use PerfView, dotTrace, BenchmarkDotNet, and built-in Visual Studio tools to find problems.
- Memory management — garbage collection, leaks, object pools, structs vs classes, Span
and Memory . - Asynchrony and parallelism — proper work with Task, ValueTask, Channel, Parallel.ForEach, and thread pools.
- Code optimization — avoiding allocations, working with LINQ, caching, aggressive inlining.
- Working with I/O and networking — asynchronous operations, buffering, latency reduction.
- High-performance patterns — Object Pool, Pipeline, Producer-Consumer, Lock-free structures.
Who is this book for?
The book is intended for C# developers with at least 1 year of experience who want to advance to a senior level. It will be useful for:
- Backend developers working with high-load services.
- Game developers using Unity (C#).
- .NET infrastructure and DevOps specialists.
- Anyone who wants to write code that operates at the platform's performance limits.
What will you learn?
After reading, you will be able to:
- Conduct profiling and benchmarking of any code.
- Eliminate memory leaks and reduce GC load.
- Optimize asynchronous operations and reduce response time.
- Apply modern .NET constructs (Span, Memory, IAsyncEnumerable).
- Design systems with predictable performance.
The book contains numerous code examples, real-world cases, and practical tips. All examples are relevant for .NET 6/7/8 and C# 10/11/12.
Dive into the world of high-performance .NET — start writing code that flies!