Awesome
Awesome .NET Performance
A curated list of awesome .NET Performance books, courses, trainings, conference talks, blogs and most inspiring open source contributors. Inspired by awesome-... stuff.
- Awesome .NET Performance
Books
- Pro .NET Performance: Optimize Your C# Applications by Sasha Goldshtein, Dima Zurbalev, Ido Flatow (2012)
- Pro .NET Memory Management: For Better Code, Performance, and Scalability by Konrad Kokosa (2018)
- Pro .NET Benchmarking: The Art of Performance Measurement by Andrey Akinshin (2019)
- CLR via C# by Jeffrey Richter (2012)
- Pro Asynchronous Programming with .NET by Richard Blewett, Andrew Clymer (2013)
- Writing High-Performance .NET Code by Ben Watson (2018)
- Advanced .NET Debugging by Mario Hewardt (2009)
- Concurrent Programming on Windows by Joe Duffy (2008)
- .NET IL Assembler by Serge Lidin (2014)
- High-Performance Windows Store Apps by Brian Rasmussen (2014)
- Customizing the Microsoft® .NET Framework Common Language Runtime by Steven Pratschner (2005)
- Under the Hood of .NET Memory Management by Chris Farrell and Nick Harrison (2011)
- Functional Concurrency in .NET by Riccardo Terrell (2018)
Video Courses
- Mastering .NET Performance Tuning by John Robbins
- Using Threads Effectively to Build Scalable, Responsive, and Fast .NET Applications and Components by Jeffrey Richter
- Making .NET Applications Faster by Sasha Goldshtein
- Making .NET Applications Even Faster by Sasha Goldshtein
- Measuring .NET Performance by Sasha Goldshtein
- PerfView Tutorial by Vance Morrison
- Defrag Tools - Perf View by Vance Morrison
- High Performance Coding with .NET Core and C# by Gergely Kalapos
- Defrag tools about CLR GC part 1 part 2 part 3 and part 4 with Maoni Stephens
- .NET Async Expert by Dotnetos
- .NET Memory Expert by Dotnetos
- .NET Diagnostics Expert by Dotnetos
On-Site Trainings
- .NET Performance and Debugging Workshop by SELA (Israel)
- .NET Performance by SELA (Israel)
- Asynchronous Computing and Composing Asynchronous and Event-Based by SELA (Israel)
- Parallel Programming with the TPL by SELA (Israel)
- Solid Async in .NET by Rock Solid Knowledge (UK)
- Mastering .NET Performance Tuning by Wintellect (USA)
- Mastering .NET Threading by Wintellect (USA)
Upcoming conferences
- 2021
- Dotnetos - .NET Performance World - Two-day conference dedicated solely to .NET performance! (05-06 October 2021, Online)
Conference talks
Sorted from newest to oldest:
- 2021
- Background type preloading and MultiCoreJit in .NET 6 by Gleb Balykov (15.09.2021, Samsung Open Source Conference Russia)
- 2020
- Running .NET Core performance investigation on Linux by Adam Sitnik (20.11.2020, DotNext)
- What's so hard about pinning? by Maoni Stephens, (28.09.2020, Dotnetos Conference)
- The Art of Tracing by Sebastian Solnica (01.10.2020, Dotnetos Conference)
- Performance Improvements in .NET 5 by Stephen Toub (02.10.2020, Dotnetos Conference)
- Beating CoreCLR's own C++ code with CoreCLR 3.0 intrinsics by Dan Shechter (10.03.2020, DotNext)
- From ETW to EventPipe by Christophe Nasarre-Soulier (10.03.2020, DotNext)
- 2019
- What the game industry taught me about performance by Brian Rasmussen, (10.11.2019, Øredev)
- Compiling and Running a PHP on .NET Core by Jakub Míšek, (11.10.2019, Dotnetos Conference)
- Ethereum performance in .NET Core by Tomasz Stanczak, Piotr Gankiewicz, (11.10.2019, Dotnetos Conference)
- To ORM or not to ORM by Łukasz Dziekan, (11.10.2019, Dotnetos Conference)
- Writing Allocation Free Code in C# by Matt Ellis, (11.10.2019, Dotnetos Conference)
- Cliff diving into async in .NET Core and C# 8 by Daniel Marbach, (11.10.2019, Dotnetos Conference)
- Performance Testing by Andrey Akinshin, (10.10.2019, Dotnetos Conference)
- How Entity Framework translates LINQ all the way to SQL by Shay Rojansky, (10.10.2019, Dotnetos Conference)
- .NET Intrinsics in CoreCLR 3.0 by Dan Schechter, (10.10.2019, Dotnetos Conference)
- The .NET Garbage Collector by Peter Sollich, (10.10.2019, Dotnetos Conference)
- .NET Performance Investigation by Adam Sitnik, (10.10.2019, Dotnetos Conference)
- Performance in the .NET Runtime by Matt Warren, (10.10.2019, Dotnetos Conference)
- Spanification by Adam Sitnik (09.09.2019, Update Conference Prague)
- Debugging asynchronous scenarios in .NET by Kevin Gosse, Christophe Nasarre (16.08.2019, DotNext)
- Building your own profiling and diagnosis tools with Event Tracing for Windows by Pavel Yosifovich (16.08.2019, DotNext)
- JIT and AOT in the CLR by Mei-Chin Tsai (30.07.2019, JVM Language Summit)
- Powerful benchmarking in .NET by Adam Sitnik (09.07.2019, Update Conference Prague)
- What’s new for performance in .NET Core and ASP.NET Core 3.0 by Ben Adams (08.07.2019, .NET Core Summer Event)
- Ref struct, ref readonly struct, ref returning, ref everything! by Konrad Kokosa (04.06.2019, DotNext)
- Building responsive and scalable applications by Jeffrey Richter (26.03.2019, DotNext)
- Make your custom .NET GC — "whys" and "hows" by Konrad Kokosa (18.03.2019, DotNext)
- Extend the new WinDbg to build your own dream debugging tool by Kevin Gosse (18.03.2019, DotNext)
- Tuning a Runtime for Both Productivity and Performance by Mei-Chin Tsai (26.02.2019, QCon)
- 2018
- Efficient Buffer Manipulation using C# 7.2's Span by Jeffrey Richter (28.11.2018, SPB .NET Meetup)
- Building your own debugging toolbox with ClrMD by Christophe Nasarre (28.11.2018, DotNext)
- Scratched metal by Federico Lois (26.10.2018, DotNext)
- PerfView: The Ultimate .NET Performance Tool by Sasha Goldshtein (27.08.2018, QCon)
- Advanced .NET debugging techniques from a real world investigation by Christophe Nasarre & Kevin Gosse (21.08.2018, DotNext)
- Patterns for high-performance C# by Federico Lois (08.02.2018, DotNext)
- 2017
- What's new for performance in .NET Core 2.0 by Ben Adams (2017.11.09, CORESTART 2.0)
- State of the .NET Performance by Adam Sitnik (2017.07.05, NDC)
- Look Mommy, No GC! by Dina Goldshtein (2017.03.23, NDC)
- Squeezing the Hardware to Make Performance Juice by Sasha Goldshtein (2017.03.17, DotNext)
- Performance tuning Stack Overflow tags by Marco Cecconi (2017.03.17, DotNext)
- Multithreading Deep Dive by Gael Fraiteur (2017.03.17, DotNext)
- Stack Overflow — It's all about performance! by Marco Cecconi (2017.03.17, DotNext)
- ETW — Monitor Anything, Anytime, Anywhere by Dina Goldshtein (2017.03.17, DotNext)
- Exceptional Exceptions in .NET by Adam Sitnik (2017.03.17, DotNext)
- 2016
- PerfView: Measure and Improve Your App's Performance For Free by Sasha Goldshtein (2016.11.02, DotNext)
- The C++ and CLR Memory Models by Sasha Goldshtein (2016.11.02, DotNext)
- Safe Systems Programming in C# and .NET by Joe Duffy (2016.08.20, QCon)
- ASP.NET Core Kestrel: Adventures in building a fast web server by Damian Edwards & David Fowler (2016.08.12, NDC)
- Performance and How to Measure It by Matt Warren (2016.07.28, ProgSCon)
- Performance Optimizations in the Wild by Oren Eini (Ayende) (2016.06.23, NDC)
- The Vector in Your CPU: Exploiting SIMD for Superscalar Performance by Sasha Goldshtein (2016.04.19, DotNext)
- Lessons in Extreme .NET Performance by Ben Watson (2016.03.13, QCon)
- Older
- Making .NET applications faster by Sasha Goldshtein (2015.10.30, DevWeek)
- The zen of async: Best practices for best performance by Stephen Toub (2011.09.13, Build)
Blogs
- Maoni Stephens
- Stephen Toub
- Matt Warren
- Andrey Akinshin
- Dan Shechter
- Egor Bogatov
- Oren Eini aka Ayende
- Alexandre Mutel aka xoofx
- Vladimir Sadov
- Adam Sitnik
- Konrad Kokosa
- Kunal Pathak
Inspiring Open Source Contributors
- Ben Adams
- Jan Kotas
- Stephen Toub
- Kunal Pathak
- mikedn
- Tanner Gooding
- Vladimir Sadov
- Dan Shechter
- Egor Bogatov
- Federico Andres Lois
- Konrad Kokosa
- nietras
Performance tools
Benchmarking
- BenchmarkDotNet - Powerful .NET library for benchmarking.
- NBench - Cross-platform performance benchmarking and testing framework for .NET applications.
- CsCheck Faster - Random data range, multithreaded, cross-platform/machine, unit testing integrated, relative performance testing.
Profiling
- Prefix - Free lightweight profiler for ASP.NET apps shows everything your code is doing across 30+ common libraries
- MiniProfiler - Free profiling tool for .NET applications with Entity Framework and ASP.Net integration (Core supported for both versions)
- dotTrace - Paid profiler for .NET applications from the JetBrains team, included in the Resharper Ultimate package
- Unchase.FluentPerformanceMeter - Free open-source and cross-platform .Net Standard 2.0 library that is designed for the method’s performance measurement
- codetrack - Free .NET performance profiler and execution analyzer
Application Insights
- App Metrics - App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application and reports it's health. See the docs for more details.
Analyzers
- Clr Heap Allocation Analyzer Clr Heap Allocation Analyzer is a Roslyn based Diagnostic Analyzer that is able to detect most allocations in code in the local method and bring them to your attention in Visual Studio.
Load Testing
- NBomber A lightweight framework for writing load tests to use on any PULL or PUSH system (HTTP, WebSockets, GraphQl, gRPC, SQL Databse, MongoDb, Redis etc). Dynamic CLI output, report generation, and trend analysis. Written in F# and targeting .NET Core and full .NET Framework.
- JMeter DLS A simple API for JMeter that enables using you IDE to design and run test using .NET.
Article series
Benchmarking
- Microbenchmark Design Guidelines by Adam Sitnik
- The Art of Benchmarking by Matt Warren
- Adventures in Benchmarking - Memory Allocations by Matt Warren
- Micro-Benchmarking Done Wrong, And For The Wrong Reasons by Sasha Goldshtein
- On ‘stackalloc’ Performance and The Large Object Heap by Sasha Goldshtein
- Micro-Benchmarking Considered Harmful by Sasha Goldshtein
- On Measuring Performance by Sasha Goldshtein
- Stopwatch under the hood by Andrey Akinshin
- DateTime under the hood by Andrey Akinshin
- Benchmarking made easy by Jon Skeet
- Simple microbenchmarking in C# by Jon Skeet
- Acquiring high-resolution time stamps
- Performance exercise: Minimum by Andrey Akinshin
- Performance exercise: Division by Andrey Akinshin
- Measuring Performance Improvements in .NET Core with BenchmarkDotNet (Part 1) by Andrey Akinshin
- AWS Lambda — Container Image .NET Benchmark by İren Saltalı
Monitoring
- Performance Counters Hell by Criteo Labs
- Replace .NET performance counters by CLR event tracing by Criteo Labs
- Grab ETW Session, Providers and Events by Criteo Labs
- Monitor Finalizers, contention and threads in your application by Criteo Labs
- In-process CLR event listeners with .NET Core 2.2 by Christophe Nasarre
- Spying on .NET Garbage Collector with TraceEvent by Christophe Nasarre
Investigations
- High-performance .NET by example: Filtering bot traffic by Alexandr Nikitin
- RyuJIT and the never-ending ThreadAbortException by Criteo Labs
- 9 posts about how to build your own toolbox with ClrMD by Criteo Labs
- .NET Threadpool starvation, and how queuing makes it worse by Criteo Labs
- Get-process-name challenge on a Friday afternoon by Christophe Nasarre
- In managed code we trust, our recent battles with the .NET Garbage Collector by Sam Saffron
- Tuning performance on Azure websites using remote profiling by Thomas Ardal
Debugging performances series by Tess Ferrandez
- All .NET Debugging Demos: Hang, Crash, memory, and CPU
- Reader email: Need help troubleshooting perf/memory issues
- Debugging a classic ReaderWriterLock deadlock with SOSex.dll
- New commands in SOS for .NET 4.0 Part 1
- High CPU in .NET app using a static Generic.Dictionary
- .NET Hang Case study: The danger of locking on strings
- First step in troubleshooting complex issues: Define and scope your issue properly
- Show me the memory: Tool for visualizing virtual memory usage and GC heap usage.
- .NET Memory Leak reader email: Are you really “leaking” .net memory
- .NET Memory Leak: To dispose or not to dispose, that’s the 1 GB question
JIT Optimizations
- Loop alignment in .NET by Kunal Pathak
- RyuJIT Tutorial by Carol Eidt
- JIT Optimizations by Sasha Goldshtein
- JIT Optimizations, Inlining, and Interface Method Dispatching (Part 1 of N) by Sasha Goldshtein
- JIT Optimizations, Inlining, and Interface Method Dispatching (Part 2 of N) by Sasha Goldshtein
- Performance differences between debug and release builds by Hans Passant
- Aggressive Inlining in the CLR 4.5 JIT by Sasha Goldshtein
- Jit Optimizations: Inlining (I) by David Notario
- Jit Optimizations: Inlining (II) by David Notario
- More on inlining… by Eric Gunnerson
- To Inline or not to Inline: That is the question by Vance Morrison
- Some Notes on Using Machine Learning to Develop Inlining Heuristics by Andy Ayers
- The JIT does dead-code elimination in Debuggable code by Mkie Stall
- Does the JIT take advantage of my CPU? by David Notario
- Unrolling of small loops in different JIT versions by Andrey Akinshin
- RyuJIT CTP5 and loop unrolling by Andrey Akinshin
- RyuJIT RC and constant folding by Andrey Akinshin
- A story about JIT-x86 inlining and starg by Andrey Akinshin
- LegacyJIT-x86 and first method call by Andrey Akinshin
- Do PDB Files Affect Performance? by John Robbins
- What does the optimize switch do? by Eric Lippert
- Hoisting in .NET Explained (part 1) by Alexandr Nikitin
- Hoisting in .NET Examples (part 2) by Alexandr Nikitin
Refs
- ref returns are not pointers by Vladimir Sadov
- managed pointers by Vladimir Sadov
- Local variables cannot be returned by reference by Vladimir Sadov
- Safe to return rules for ref returns by Vladimir Sadov
- Why ref locals allow only a single binding? by Vladimir Sadov
- ref returns and locals by Adam Sitnik
Threading
- An Introduction to System.Threading.Channels by Stephen Toub
- ConfigureAwait FAQ by Stephen Toub
- Threading in C# by Joseph Albahari
Memory
- .NET Memory Performance Analysis by Maoni Stephens
- GC Perf Infrastructure – Part 1 by Maoni Stephens
- GC Perf Infrastructure – Part 0 by Maoni Stephens
- The history of the GC configs by Maoni Stephens
- Finalization implementation details by Maoni Stephens
- A portable way to get GC events in process and no admin privilege with 10 lines of code (and ability to dynamically enable/disable events) by Maoni Stephens
- Making CPU configuration better for GC on machines with > 64 CPUs by Maoni Stephens
- Running with Server GC in a Small Container Scenario Part 1 – Hard Limit for the GC Heap by Maoni Stephens
- Running with Server GC in a Small Container Scenario Part 0 by Maoni Stephens
- You Should Never See This Callstack in Production by Maoni Stephens
- Middle Ground between Server and Workstation GC by Maoni Stephens
- Pooling large arrays with ArrayPool by Adam Sitnik
- Value Types vs Reference Types by Adam Sitnik
- Span by Adam Sitnik
.NET CPU Intrinsics
- Vectorization using .NET APIs by Kunal Pathak
- Hardware Intrinsics in .NET Core by Tanner Gooding
- Exploring .NET Core platform intrinsics: Part 1 - Accelerating SHA-256 on ARMv8 by Nemanja Mijailovic
- Exploring .NET Core platform intrinsics: Part 2 - Accelerating AES encryption on ARMv8 by Nemanja Mijailovic
- Exploring .NET Core platform intrinsics: Part 3 - Viewing the code generated by the JIT by Nemanja Mijailovic
- Exploring .NET Core platform intrinsics: Part 4 - Alignment and pipelining by Nemanja Mijailovic
- .NET Core 3.0 Intrinsics in Real Life - 1/3 by damageboy
- .NET Core 3.0 Intrinsics in Real Life - 2/3 by damageboy
- .NET Core 3.0 Intrinsics in Real Life - 3/3 by damageboy
- Decimating Array.Sort with AVX2 - 1/∞ by damageboy
- Decimating Array.Sort with AVX2 - 2/∞ by damageboy
- Decimating Array.Sort with AVX2 - 3/∞ by damageboy
Performance Improvements in .NET Core
- Performance Improvements in .NET 9 by Stephen Toub
- Performance Improvements in .NET 8 by Stephen Toub
- Performance Improvements in .NET 7 by Stephen Toub
- Performance Improvements in .NET 6 by Stephen Toub
- Regex Performance Improvements in .NET 5 by Stephen Toub
- Performance Improvements in .NET 5 by Stephen Toub
- Performance Improvements in .NET Core 3.0 by Stephen Toub
- Performance Improvements in .NET Core 2.1 by Stephen Toub
- Performance Improvements in .NET Core by Stephen Toub
ARM64
- Arm64 Hardware Intrinsics APIs in .NET - Part 6 by Kunal Pathak
- Arm64 Hardware Intrinsics APIs in .NET - Part 5 by Kunal Pathak
- Arm64 Hardware Intrinsics APIs in .NET - Part 4 by Kunal Pathak
- Arm64 Hardware Intrinsics APIs in .NET - Part 3 by Kunal Pathak
- Arm64 Hardware Intrinsics APIs in .NET - Part 2 by Kunal Pathak
- Arm64 Hardware Intrinsics APIs in .NET - Part 1 by Kunal Pathak
- Peephole optimizations in .NET by Kunal Pathak
- Memory barriers in ARM64 by Kunal Pathak
- ARM64 performance of .Net Core 5 by Kunal Pathak