Here are (almost) all of the infographics that I've made on .NET (C# and F#). If you like them, then consider buying me a coffee:

If you plan to use a graphic then remember to credit the author, please provide a link to my Twitter and other socials.

Note:

Not all graphics will be reproducible, and this can be for a multitude of reasons like a bug in the graphic, compiler improvements, different hardware (Ryzen9 handles ILP like a champ).

Benchmarks do not reflect actual running applications, so you need to test them each time you employ these optimizations and check the codegen.

Searching :

All of the graphics contain ALT text which is searchable via browser search.

Graphics:

PGO in .NET can be Awesome
JIT Compilation in .NET can be Awesome
Booleans in .NET can be Surprising
Generators in .NET can be Surprising
How to Pin Objects in .NET
What is Profile Guided Optimization in .NET
LINQ Optimizations in .NET can be Surprising
Assignment Optimizations in .NET can be Surprising
.NET Tiered Compilation can be Interesting
Switch Case in .NET Can be Surprising
Improvements in .NET 6 can be Awesome
Improvement in .NET 6 can be Awesome
Improvement in .NET 6 can be Awesome
Difference between IL and ASM
Inlining in .NET can be Surprising
Struct in .NET can be Surprising
Struct optimizations in .NET can be Surprising
Stack Canary
Nullable in C#
What is the cost of Nullable in .NET
.NET nullable optimization tips
What is the cost of Nullable in .NET
What is the cost of Boxing in .NET
Boxing / Unboxing in .NET can be Surprising
Unsafe Reflection without using unsafe
Loop Optimization in .NET can be Surprising
Loop Optimization in .NET can be Surprising
Loop Optimization in .NET can be Surprising
Loop Optimization in .NET can be Surprising
Lambda Hoisting in .NET can be Surprising
Lambda Hoisting in .NET can be Surprising
Lambdas in .NET can be Surprising
Struct Locals in .NET can be Surprising
Struct Locals in .NET can be Surprising
Decompilation in .NET can be Surprising
How to access elements of an array without bounds checks
How to run native code in .NET
Loop Cloning in .NET can be Surprising
Loop Optimizations in .NET6 can be Awesome
Static Branch Elimination in .NET
Branch Heuristics in .NET can be Surprising
How to access the internal array of a list
Improvements in .NET6 can be Awesome
Boxing a reference type
Tiered Compilation in .NET can be surprising
Tiered Compilation in .NET can be surprising
Isn't this surprising?
Tuple switch in .NET can be surprising
Tuple switch in .NET can be surprising
Try Catch in .NET can be surprising
What is the cost of a Stack Spill
The cost of virtualization in .NET can be surprising (interface)
The cost of virtualization in .NET can be surprising (interface)
The cost of virtualization in .NET can be surprising (interface)
The cost of virtualization in .NET can be surprising (array)
The cost of virtualization in .NET can be surprising (list)
The cost of virtualization in .NET can be surprising
Isn't this surprising? copy to local helps
Copying to locals in .NET can be surprising
Locals in .NET can be surprising (again)
Aligment problems in .NET 5
Debug Symbols vs. Codegen
String Interpolation in .NET can be Surprising
Locals in .NET can be surprising
Arguments in .NET can be surprising
Where is the Length of an array stored in .NET?
Try vs no Try
Outer Try vs No Try
Try Catch can be surprising
Try Catch can be surprising 2
Try Catch can be surprising 3
Try Catch can be surprising 4
Try Catch can be surprising 5
Try Catch can be surprising 6
Array access can be surprising
Boolean logic can be surprising
Boolean logic can be surprising 2
Booleans can be surprising
How compilers take branches
How compilers solve or branches
Conditions in .NET can be surprising
Class Optimizations can be surprising
Conditions can be surprising
Conditions can be surprising F# vs C#
Conditions can be surprising F# vs C#
Conditions can be surprising 1
Conditions can be surprising 2
Conditions can be surprising 3
Conditions can be surprising 4
F# conditions can be surprising (no longer valid, was fixed thanks to yours truly :D)
Conditions in .NET can be surprising
Conditions in .NET can be surprising 2
Conditions in .NET can be surprising 3
Branch prediction in .NET can be surprising
Optimizations in .NET can be surprising (loops are no being aligned)
Standard type checks vs "is" type check
Dead code elimination can be surprising
Function Epilogue gotchas
What is False Sharing in .NET
What is False Sharing in .NET 2
Fold optimizations can be surprising
Fold optimizations can be surprising 2
Folding optimizations can be surprising
F# Lambda optimizations are awesome 1
F# Lambda optimizations are awesome 2
F# Lambda optimizations are awesome 3
F# Lambda optimizations are awesome 4
F# Lambda optimizations are awesome 5
Optimizations in .NET can be surprising (decompile the code to native code and you'll see what I mean)
Same method - Different Data - How branch prediction affects performance
Unused Count = Faster? How compiler reuses registers
Same Method - Same Data - Different Performance - How we can measure noise at nanosecond time slices
Two Methods - Different number of Multiplications (this one has a bug need to assign to locals first)
Huh? Infinite loop in IL
Isn't this surprising? Copying to local changes codegen
Instruction Level Parallelism is awesome
Instruction Level Parallelism is awesome
Instruction Level Parallelism optimizations are surprising
Instruction Level Parallelism optimizations are surprising (works on Intels, AMD is like hold my beer)
Instruction Level Parallelism is awesome
Inlining optimizations can be surprising
Inlining optimizations can be surprising 2
Inlining optimizations can be surprising 3
Inlining optimizations can be surprising 4
Inlining optimizations can be surprising 5
Inlining optimizations can be surprising 7 (there was no 6)
Inlining optimizations can be surprising
Inlining can be surprising
Numerics vs Intrinsics
Numerics vs Intrinsics
Numerics vs Intrinsics
JIT Branch Elimination is awesome
JIT Branch Elimination is awesome 2
JIT Branch Elimination can be surprising 2
JIT Branch Elimination can be surprising 3
Lambda Optimization Tips 1 (lambda vs local function)
Lambda Optimization Tips 2 (lambda vs function pointers)
Lambda Optimization Tips 3 (function pointers vs value delegates)
LINQ optimizations can be surprising
LINQ optimizations can be surprising 2
What is a lock in C#
Difference between IL and X86 ASM in .NET
LINQ optimizations can be surprising
LINQ optimizations are surprising