[PATCH 4/4] libstdc++: More efficient last day of month.

Jonathan Wakely jwakely@redhat.com
Wed Feb 24 18:54:06 GMT 2021


On 23/02/21 23:13 +0100, Matthias Kretz wrote:
>I like the idea.
>
>On Dienstag, 23. Februar 2021 14:25:10 CET Cassio Neri via Libstdc++ wrote:
>> ((__m ^ (__m >> 3)) & 1) | 30
>
>Note that you can drop the `& 1` part. 30 in binary is 0b11110. ORing with a
>value in [0, 0b01101] will only toggle the last bit.

Yeah looks right to me.

I've committed all Cassio's patches unchanged (except for whitespace
and the dates on the tests) but we can make this additional
improvement too.

Thanks, Cassio. Nice first contributions to libstdc++!



More information about the Gcc-patches mailing list