]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Remove __find_if unrolling for random access iterators
authorJonathan Wakely <jwakely@redhat.com>
Thu, 4 Jul 2024 11:01:29 +0000 (12:01 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Jul 2024 17:06:02 +0000 (19:06 +0200)
commit7ad3d3303bbc2c3fd78f91dee96b1c023f9a2744
treece4a6e4e0122167f79f087cb099f0256f971f597
parent64948288f673b6b7e5083081c019d6ef50e6e04d
libstdc++: Remove __find_if unrolling for random access iterators

As the numbers in PR libstdc++/88545 show, the manual loop unrolling in
std::__find_if doesn't actually help these days, and it prevents the
compiler from auto-vectorizing.

Remove the dispatching on iterator_category and just use the simple loop
for all iterator categories.

libstdc++-v3/ChangeLog:

* include/bits/stl_algobase.h (__find_if): Remove overloads for
dispatching on iterator_category. Do not unroll loop manually.
* include/bits/stl_algo.h (__find_if_not): Remove
iterator_category argument from __find_if call.
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/include/bits/stl_algobase.h