The C# compiler turns one `yield` keyword into an entire state machine. Learn how this hidden process impacts your code's performance and memory usage.
#1about 7 minutes
Defining C# lowering and its benefits
C# lowering is the process of transforming high-level language features into simpler constructs, which simplifies the compiler and ensures predictable performance.
#2about 3 minutes
Subtle differences in property getter implementations
The `var` keyword is lowered to its inferred type, while expression-bodied properties can introduce subtle behavioral changes compared to traditional getters.
#3about 4 minutes
How `foreach` is lowered for arrays versus lists
A `foreach` loop is lowered to an index-based `while` loop for arrays but uses the `IEnumerable` pattern with a `try-finally` block for lists, impacting performance.
#4about 2 minutes
The danger of using `async` without `await` in `using` blocks
Combining `IDisposable` with an `async` call without `await` can lead to the object being disposed before the asynchronous operation completes.
#5about 9 minutes
Understanding the `yield` keyword and its performance
The `yield` keyword generates a state machine class to enable deferred execution, trading slower per-item runtime for significantly lower memory allocation.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
07:30 MIN
Practical examples of reducing software's footprint
Introducing Green IT practices to a large Software Company
02:38 MIN
Exploring the five levels of tiered compilation
Just-in-time Compilation in JVM
02:35 MIN
Overview of modern C# community-loved features
Modern C#: A Dive into the Community's Most Loved new Features.
02:48 MIN
A brief history of C# from version 1 to 12
C# 13 Unleashed: Live Demos of my Top 10 Cutting-Edge Features!
02:13 MIN
Introduction to five key features in C# 10
5 features that help you get the most out of C# 10
05:27 MIN
Using a compiler approach to reduce framework code
To New Frontiers: The Future of Frontend Development
07:05 MIN
Exploring the auto-generated C# code from Model Builder
Machine Learning in ML.NET
07:21 MIN
Contrasting minimalist code with modernizing legacy applications
The weekly developer show: Boosting Python with CUDA, CSS Updates & Navigating New Tech Stacks
GitHub Copilot: Beyond the Basics – 10 Ways to Elevate Your CodingWelcome to an in-depth exploration of GitHub Copilot and its capabilities. If you're a software developer or someone intrigued by AI's potential to revolutionize coding, this post is for you. GitHub Copilot, an AI-powered code completion tool, offers...
Get Old, go Slow, Write Code!Welcome to the newest series of the WeAreDevelopers Magazine – Dev Talk Recap. This article recaps an interesting talk by Tobias Modig who gave advice about getting old(er) as a developer and slowing down. What you will learn:Thoughts of the speaker ...
Chris Heilmann
Dev Digest 134 - Where pixels sing?News and ArticlesWeAreDevelopers LIVE Data and Security Day is on Wednesday, 25/09/2024. Learn about OPC UA Updates, Best Practices for Using GitHub Secrets, Passwordless Web 1.5, Emerging AI Security Risks, Data Privacy in LLMs and get a chance to t...
From learning to earning
Jobs that call for the skills explored in this talk.