[JIT] Pass TypePtr by reference in Argument::type() and Type::isSubtypeOfExt(). (#48061)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48061
This results in a ~6% improvement on DeepAndWide model and would improve
other models as well.
Before the change:
```
393[ms]
458[ms]
413[ms]
390[ms]
430[ms]
399[ms]
426[ms]
392[ms]
428[ms]
399[ms]
```
After the change:
```
396[ms]
375[ms]
396[ms]
392[ms]
370[ms]
402[ms]
395[ms]
409[ms]
366[ms]
388[ms]
```
Differential Revision: D25006357
Test Plan: Imported from OSS
Reviewed By: suo
Pulled By: ZolotukhinM
fbshipit-source-id: c9cdc6354c42962b14207db31cf2580a4e2430b1
Author
Mikhail Zolotukhin