[Bug libstdc++/113046] Standard algorithms should do de-iterator optimizations

2023-12-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113046

Jonathan Wakely  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Jonathan Wakely  ---
dup, no need for a second PR

*** This bug has been marked as a duplicate of bug 107367 ***

[Bug libstdc++/113046] Standard algorithms should do de-iterator optimizations

2023-12-16 Thread unlvsur at live dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113046

--- Comment #1 from cqwrteur  ---
-Os optimization could observe the issue more clearly. The number of
instructions reduced 51.94%, which is huge.
https://godbolt.org/z/Eh1P1vvo5

I guarantee you this will improve the overall performance of C++ for a lot.