Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore a pragmatic approach to performance optimization in this 43-minute conference talk. Learn when to prioritize performance, how to correctly benchmark .NET code, and discover common performance pitfalls in the .NET Framework. Gain insights into the true meaning behind the phrase "premature optimization is the root of all evil" and understand the importance of context in coding decisions. Dive into practical demonstrations using BenchmarkDotNet, comparing various coding techniques such as loops vs LINQ, and Substring vs Span. Discover how to make informed decisions about performance improvements based on trustworthy benchmarking results. Walk away with a balanced understanding of when to focus on performance and how to effectively optimize your code.
Syllabus
Introduction
Premature optimization
Donald Knuth
Debugging and maintenance
Coding is about tradeoffs
Know the context
Code Profiling
Benchmarknet
Demo
Writing a benchmark
Baseline
Benchmarks
Results
Whats more important
Dictionary benchmarks
Coding standards
Loops vs Link
Link has other benefits
Substring vs Span
Span vs substring
Swapping out components
The perfect performance story
Summary
Taught by
NDC Conferences