[jit] Eliminate malloc & recursive refcount bumps in HashType::operator() (#65348)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65348
Previously, this took several percent of model loading time. Now it is well under 1%.
We get this savings by avoiding allocating a vector and avoiding reference count bumps on contained types within each type.
ghstack-source-id: 140148562
Reviewed By: suo
Differential Revision: D31057278
fbshipit-source-id: 55a02cbfefb8602e41baddc2661d15385fb2da55