Why is typeA == typeB slower than typeA == typeof(TypeB)? Languages

Why is typeA == typeB slower than typeA == typeof(TypeB)?

I've been optimising/benchmarking some code recently and came across this method:This is called from a performance critical loop elsewhere, so I naturally assumed all those typeof(...) calls were adding unnecessary overhead (a micro-optimisation, I know) and could be moved to private fields within the class. (I'm aware there are better...
Read More