In python isinstance(foo, (Bar,)) is considered slow because Python need to check for the object hierarchy to see if the condition hold. Does this happen on C# too?
I'm particularly interested if (maybeNullFoo is Foo foo) is slower than (maybeNullFoo != null) in C#? I'm using this in the codebase to cancel a nullable variable, using is Foo foo the compiler knows that foo is not null so I don't need to use ! or ?