<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/129322>129322</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc++] Optimize `ranges::contains_subrange`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++,
            performance
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ldionne
      </td>
    </tr>
</table>

<pre>
    There are a few special cases that are easy to spot:
- subrange is only 1 element (this is a `contains`)
- the two ranges are the same length (this is `equal`)

And we can probably take advantage of a properly optimized `std::find_if` in the general version.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxMkk-PmzAQxT-NuYwSmQHz58Ah2yjXXnpfDXgAt8amtkmUfvoKNtuuBLI0Y__G7z1TjGZyzJ1Qb0JdM9rS7ENntfHOcdZ7_ex-zBwYaP9h5AfElQdDFgaKHCHNlI4mU3xC8hBXn0RxEfJygrj1gdzEYCJ4Z5-QA1te2CUQ2KTZxL1DICo5eJfIuCgqKbA9TqeZIT08HIh4DNlLkRYGy25K81eKqCT_3sj-Awh5uTgND4aBHKzB99TbJyT6xUD6Ti7RxOBHoL25crBP8Gsyi_nDesfFpHchxWU0Tr-bUVQSjDvuMLHjQBbuHKLx7pzprtBt0VLGXV6Xsq6bsi6yuWt0Weeq5rJo-pzqWqIeq1G1reJCKVVnpkOJSiI2mBdlUZx1w7pi5ErWY9O0SpSSFzL2bO19OfswZSbGjbsc2wIxs9SzjUd-iNb0g8C340OB3wTiymH0YSE38F5T1yx0O-nUb1MUpbQmpvifnUyyx2v4glJX-P7yZbflI44PZz5Te_9MWlQy24Lt5pTWYw_eBN4mk-atPw9-EXjbZ72W0xr8Tx6SwNshKgq8vXTdO_wbAAD__9gx1bU">