[PyTorch] Further reduce cost of TypeMeta::_typeMetaData (by 10x!) (#98105)
Currently we should be paying a small cost for the
thread-safe initialization of `index`. Now we should eliminate that
cost. (10x figure in the title comes from internal benchmark that just
calls `TypeMeta::Match<caffe2::Tensor>()` in a loop).
Differential Revision: [D44597852](https://our.internmc.facebook.com/intern/diff/D44597852/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98105
Approved by: https://github.com/ezyang