C# If Else Internals
LevelUp
0:00 / 0:00
C# If Else Internals
3 849 просмотров · 5 лет назад
LevelUp
6,56 тыс. подписчиков
3 849 просмотров · 5 лет назад
In this video, we're going to look at C# If Else Internals and what interesting things happen under the hood, and how they affect performance.
Chapters:
Into (0:00)
If Inverted Jump (0:35)
If Inverted Jump use case (7:48)
If with a return (12:00)
If with a throw (13:04)
if with a throw helper (14:10)
JIT branch elimination (17:26)
JIT confused me :) (20:00) - Turns out that you don't need a function but anything that *can be resolved at compile-time*. So const int Flag will work as well.
Outro (22:10)
♦ Instagram: / level_uppp01
♦ Twitter: / badamczewski01
♦ Blog: https://leveluppp.ghost.io
#csharp #dotnet #dotnetcore #performance #jit #internals