> On May 21, 2021, at 1:46 PM, Cassio Neri via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > Simple change to std::chrono::year::is_leap. If a year is multiple of 100, > then it's divisible by 400 if and only if it's divisible by 16. The latter > allows for better code generation. I wonder if the optimizer could be taught to do that. The change seems correct but it is very confusing; at the very least the reasoning you gave should be stated in a comment on that check. paul
Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.
Koning, Paul via Gcc-patches Fri, 21 May 2021 11:05:32 -0700
- [PATCH] libstdc++: More efficient std::chr... Cassio Neri via Gcc-patches
- Re: [PATCH] libstdc++: More efficient... Koning, Paul via Gcc-patches
- Re: [PATCH] libstdc++: More effic... Cassio Neri via Gcc-patches
- Re: [PATCH] libstdc++: More e... Jonathan Wakely via Gcc-patches
- Re: [PATCH] libstdc++: Mo... Jonathan Wakely via Gcc-patches
- Re: [PATCH] libstdc+... Jonathan Wakely via Gcc-patches
- Re: [PATCH] libs... Jonathan Wakely via Gcc-patches
- Re: [PATCH] ... Cassio Neri via Gcc-patches