[PyTorch] Compare Type pointers before calling operator== in EqualNode (#65352)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65352
This can be a big win if it saves the virtual call to operator== and the cost is tiny.
ghstack-source-id: 138497657
Test Plan: Profiled ptvsc2_predictor_bench startup, inclusive time spent in EqualNode::operator() dropped from 0.8% to negligible
Reviewed By: hlu1
Differential Revision: D30974969
fbshipit-source-id: 9c3af36cffe709dfce477dcc49722536470264a0