Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make tuple checks faster (pytorch#16657)
Summary: As the comment indicates, the issue is only present in some versions of Python 2, so we should be able to use heavily optimized PyTuple_Check in most cases, and skip allocation of the strings, and unnecessary lookups on object's type. cc ezyang zasdfgbnm Pull Request resolved: pytorch#16657 Differential Revision: D13957854 Pulled By: ezyang fbshipit-source-id: be32eb473ad77a0805e8247d8d583d673d4bdf25
- Loading branch information