Branch Prediction - How much does an if cost?
Explains CPU branch prediction using a railroad analogy, detailing how predictable conditional statements (if/else) can significantly improve performance.
Steven Giesel is a Senior Software Engineer and Microsoft MVP with over 13 years of experience, specializing in .NET and modern backend development. He shares deep technical knowledge across topics such as C#, EF Core, RavenDB, distributed systems, and cloud-native architectures, and is an active speaker in the .NET community.
323 articles from this blog
Explains CPU branch prediction using a railroad analogy, detailing how predictable conditional statements (if/else) can significantly improve performance.
A tutorial on using the ILGPU library to perform GPU-accelerated matrix multiplication in C#, comparing performance with a naive CPU implementation.
Explores C# .NET 6 preview features enabling static abstract members in interfaces, focusing on generic math and parsable contracts.
A guide to implementing a type-safe, feature-rich alternative to C#'s built-in enum, addressing its common shortcomings.
A guide to using a Git hook to automatically prefix commit messages with JIRA ticket numbers from branch names.
A guide to implementing and managing API versioning in ASP.NET Core, covering setup, benefits, and practical examples.
A guide to creating and using Git aliases to streamline common version control commands and improve workflow efficiency.
Explains the key differences between IEnumerable and IQueryable in C#/.NET, focusing on in-memory vs. remote query execution.
A guide to using git bisect for efficient bug hunting by performing a binary search through commit history to find the first broken commit.
A guide explaining how to use the `git rebase --onto` command to move a feature branch's commits from one base branch to another.
Explores Creational Design Patterns in C#, focusing on the Factory and Fluent Builder patterns with practical code examples.
Analyzes C# struct equality performance, comparing default structs, IEquatable implementations, and C# 10 record structs.
Explores how to enable foreach loops on C# types without implementing IEnumerable, using GetEnumerator methods and extension tricks.
Explains how to use Task.WhenAny with CancellationTokenSource in C# to cancel remaining asynchronous tasks after the first one completes.
Explores how C# string interpolation uses boxing/unboxing and its performance impact, comparing string.Format and string.Concat.
Overview of key new features in EF Core 6, including compiled models, performance improvements, and batching for SQL queries.
A tutorial on implementing end-to-end (E2E) testing in Blazor applications using the Playwright automation framework for .NET.
Discusses the pros and cons of using unsigned integers (uint) in C#, covering CLS compliance, wrap-around risks, and practical use cases.
A talk on async/await in .NET, covering pitfalls, differences from parallel programming, and internal state machine workings.
A tutorial on setting up and writing unit tests for Blazor components using bUnit, with an introduction to end-to-end testing concepts.