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

Matthias Kretz m.kretz@gsi.de
Tue Feb 23 22:13:04 GMT 2021


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.

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


More information about the Libstdc++ mailing list