Basic Performance Optimizations
In this module we'll examine some basic performance optimizations.
Lesson Preview
We explain the full cost of a box operation at the IL level including heap allocation, memory zeroing, type descriptor initialization, and reference placement on the stack. The lesson identifies non-generic collection classes in System.Collections as a primary source of hidden boxing in real-world code.
Lessons
- Optimizing Boxing And Unboxing Preview 10 min
- Collection And Data Classes To Avoid 7 min
- Demo: Benchmarking Boxing And Unboxing 7 min
- String and StringBuilder Performance (part 1) 10 min
- String and StringBuilder Performance (part 2) 11 min
- Demo: Benchmarking String versus StringBuilder 7 min
- List and Array Performance 6 min
- Pre-sizing Lists 9 min
- Demo: Benchmarking Lists and Arrays 5 min
- Demo: Lists and Arrays in Intermediate Language 7 min
- Lists and Arrays Performance Recap 2 min
- Exception Performance 7 min
- Parse versus TryParse 7 min
- Demo: Benchmarking Exceptions 8 min