[PyTorch] remove string_view::operator[] bounds check (#64670)
authorScott Wolchok <swolchok@fb.com>
Wed, 15 Sep 2021 16:55:02 +0000 (09:55 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 15 Sep 2021 16:57:58 +0000 (09:57 -0700)
commit54cdf651fd6432f1a33de2e2b2b1724ac2671cdd
tree4b24c712429f3ee3d274b558954ace3c9007236c
parent57420a6063295a5008bd5f22ae126f8fa14cd1d2
[PyTorch] remove string_view::operator[] bounds check (#64670)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64670

Bounds checking is not required for `std::string_view`, and the checking hoses performance for the following performance prototype diff.
ghstack-source-id: 138037531

Test Plan: CI

Reviewed By: ezyang, bhosmer

Differential Revision: D30747515

fbshipit-source-id: 1f4374415a82dfdccce76ea2c6885c13cb93d369
c10/test/util/string_view_test.cpp
c10/util/string_view.h