CppSignature: Compare types by their mangled names (#67987)
Summary:
`.name()` has to call `__cxa_demangle` and allocate a new string, both of which can be avoided by just comparing the mangled names directly.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67987
Reviewed By: mruberry
Differential Revision: D32264560
Pulled By: H-Huang
fbshipit-source-id: 9dd4388ba4e2648c92e4062dafe6d8dc3ea6484e