https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113811

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:4d819db7f229a23cb15ef68f310e0bb51d201c45

commit r14-9001-g4d819db7f229a23cb15ef68f310e0bb51d201c45
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Feb 8 15:40:32 2024 +0000

    libstdc++: Use unsigned division in std::rotate [PR113811]

    Signed 64-bit division is much slower than unsigned, so cast the n and
    k values to unsigned before doing n %= k. We know this is safe because
    neither value can be negative.

    libstdc++-v3/ChangeLog:

            PR libstdc++/113811
            * include/bits/stl_algo.h (__rotate): Use unsigned values for
            division.

Reply via email to