-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was a performance bottleneck when type checking torch. It used to perform lots of set unions and hash value calculations on mypy type objects, which are both pretty expensive. Now we mostly rely on set contains and set add operations with strings, which are much faster. We also avoid constructing many temporary objects. Speeds up type checking torch by about 3%. Also appears to speed up self check by about 2%.
- Loading branch information
Showing
2 changed files
with
82 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters