<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/102817>102817</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++] Add segmented iterator optimizations to more algorithms
</td>
</tr>
<tr>
<th>Labels</th>
<td>
metabug,
libc++,
performance
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
philnik777
</td>
</tr>
</table>
<pre>
We have a few algorithms which are optimized for segmented iterators, but a lot aren't yet. These algorithms would most likely benefit from adding such an optimization:
- [ ] `count_if`
- [ ] `count` (should probably forward to `count_if`)
- [ ] `equal`
- [ ] `fill`
- [ ] `fill_n` (one should probably forward to the other)
- [ ] `fold_left_with_iter`
- [ ] `for_each_n` (Should probably forward to `for_each`)
- [ ] `generate`
- [ ] `generate_n` (should probably forward to `generate`)
- [ ] `lexicographical_compare`
- [ ] `ranges::min` (range overload)
- [ ] `ranges::max` (range overload)
- [ ] `ranges::minmax` (range overload)
- [ ] `mismatch`
- [ ] `replace` (should probably forward to `replace_if`)
- [ ] `replace_if`
- [ ] `replace_copy` (should probably forward to `replace_copy_if`)
- [ ] `replace_copy_if`
- [ ] `reverse_copy`
- [ ] `swap_ranges`
- [ ] `transform`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyclN-OqzYQxp_G3Iw2Mib8u-Aie6K8QCv1Eg0wYPcYm9om2fTpK9Jkm1Qk2j0SEpLnm-83M7YGvVeDIapY-s7SfYRzkNZVk1TaqJ95nkeN7c7VHwQSjwQIPZ0A9WCdCnL0cJKqlYCOwE5Bjepv6qC3DjwNI5lAHahADoN1nokf0MwBELQNS4phIg9wprCB3yV5evC1s-5gtD6AVj9Jn6EhQ70K0Ds7AnadMgP4eYGbGxuDsoYlO8b3jO_egKXvwNI9sIy3djahVj3L-LMoyzgwUXh5QU_ONtjo89LNCV0Hwf7fR5QrVvTXjHqd0iv9IlKbawHWELwoIkgCGyS5dX5vdVdr6kN9UkHWy_SfMK2rCVv5yf3tZeM3-dPGBzLLRdM67Rb9pL0e873ZKk3Th2rt4HCSqkVdt3ac0D2BOzQD-eVhJLtR3Sq4nII9ktMWu3XMQyZ-_GqmMt9LHpUfMfw77BVrmjS29KVBXrWvXuyj5Hm8tdP5W8wl4SvgO92a6EjOf9JXFP6EU30d96ogODS-t25kGY-6KunKpMSIqjgXSVIUSckjWaXU9H2R523S5JQVSYrlNm_TJEYel1nJI1UJLra8iON4m5Yp3_RFkyW8y-JOlFhkKdtyGlHpjdbHcWPdECnvZ6piLoo4jzQ2pP1lzwoxUsBmHpgQTPxgQmjVtEy8X77r0URuqRlNS8tZuo9ctTi_NfPg2ZZr5YP_jxVU0JctfmeV7mHXdSu7-GFh-uXaRuvu9280O13JEKbLCxYHJg6DCnJuNq0dmTgs2OvvbXL2T2oDE4dLv56Jw7XlYyX-CQAA__9sKetY">