]> 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)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 27 Jul 2024 11:47:39 +0000 (12:47 +0100)
commite69456ff9a54ba3e9c93842b05757b7d8fff6d9d
tree49a4577dab61b248055497b2542001d5e1e05865
parent6d79d53eed82b1df378998bd4ced88644dcde200
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