List[index]::toOptionalStringRef (#42263)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42263
Allow a way to get a reference to the stored string in a `List<optional<string>>` without having to copy the string.
This for example improves perf of the map_lookup op by 3x.
ghstack-source-id: 109162026
Test Plan: unit tests
Reviewed By: ezyang
Differential Revision: D22830381
fbshipit-source-id: e6af2bc8cebd6e68794eb18daf183979bc6297ae