Small optimization in Types.IsGenericImplementationOf. Prevent calling GetGenericTypeDefinition (which is a quite heavy operation) if the service type is not a generic type definition (which is a much lighter operation). Types.IsGenericImplementationOf is in the hot path of the registration API and will be called on many interfaces that are not generic type definitions.
Small optimization in Types.IsGenericImplementationOf. Prevent calling GetGenericTypeDefinition (which is a quite heavy operation) if the service type is not a generic type definition (which is a much lighter operation). Types.IsGenericImplementationOf is in the hot path of the registration API and will be called on many interfaces that are not generic type definitions.

simpleinjector/SimpleInjector