<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/129327>129327</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++] Optimize `std::search_n`
</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>
We can use `std::find` to figure out where to start, and then we can probably use `std::find_if` to find the end of the sequence of `n` values.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxskU2L5SwQhX-NbqSDt5KYZOGiuy_Zvst32RgtEwejGT9u0_Prh6Sb-YABQT1V9cA5pXJ2a0CUpH8h_Z2qWraYpDcuhoB0ieZD_o9Mq8BqRkYEz8WQ9pm0z9YFQwRnJTLr1pqQxVrY-4YJTy0XlQqBV6aCYWXDwN4_OUeKi1r8xz-Bb87-Yn7OMQyGRXs9M36vGDSefyJ4OFsfylfMDTWyNVM7KYryNnR8GMYRBN2kmoQdlWnNNArkvRiV7Vo9LsJ0g-2HljoJHHoOMMKt4yCarrdcDFy0Wo83LhTpOO7K-cb7x97EtFKXc0V5g6mFgXq1oM9XgADeLZrAy3WAwCsBODDZmHYVNJ5af6dJnqSnpa6ZdNy7XPJvdnHFX-v4A9Xf2X9Hcbv78XdiGVXS29uZA63Jy62UI58lmAnMqytbXRoddwLzyf-6no4Uv6EuBObLSCYwf3l5SPgZAAD__5zCpSk">