I have a simple if in a hot member accessed from multiple threads.
if (boolFlag)
{
Interlocked.Decrement(ref SomeCount);
}
If C++ were to remove this if
case, we would probably multiply reference by flag to get null ptr or actual reference.
Is there some optimisation that would allow similar thing it C#?