High Perf - .NET Performance Benchmarking and Garbage Collector in Detail
At this meetup, we explore both performance optimization techniques with BenchmarkDotNet and dive deep into the .NET Garbage Collector to understand how memory management affects application performance.
Event Details
.NET Garbage Collector in Detail
The Garbage Collector is one of the most important components of the .NET common language runtime. In this session, we’ll take a deep dive into it. We’ll discuss the different memory segments of a .NET process, especially Thread Stacks and the Managed Heap and clarify the meaning of the Small Object Heap and Large Object Heap. We also take a look at how the GC allocates memory when we call new on a reference type, and how GC runs are executed to reclaim allocated memory. The session concludes with some useful tips on how you should structure your code in performance-critical code segments where you don’t want interference from the GC.
Introduction to Performance Optimization with BenchmarkDotNet
In this session, we’ll discuss how the Open Source library Light.GuardClauses was optimized for performance. We’ll take a look a different methods of the library and compare the performance to the previous version as well as to imperative code. We use BenchmarkDotNet which gives us the ability to write performance measurements in a unit-test-like manner. We’ll also discuss how BenchmarkDotNet executes its measurements internally.