You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't use a set to deduplicate mypy `Type` objects, since taking the
hash of a type, and possibly comparing for equality (which is needed to
add a type to a set) is more expensive than processing duplicates in
TypeIndirectionVisitor. Many of the most expensive types to process are
complex types such as callables, which often don't have many duplicates
and have complex `__hash__` methods.
This seems to speed up type checking torch slightly, by about 0.5%
(average of 100 runs).
0 commit comments