[Bug libstdc++/88545] std::find compile to memchr in trivial random access cases (patch)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 27 11:48:57 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88545
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:e69456ff9a54ba3e9c93842b05757b7d8fff6d9d
commit r15-2356-ge69456ff9a54ba3e9c93842b05757b7d8fff6d9d
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Jul 4 12:01:29 2024 +0100
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.
More information about the Gcc-bugs
mailing list