News for hackers. Stuff that matters.
Re:Popcount CPU instruction by rrss on Sunday September 08, 2019 @10:58PM (#20914874)
I'm pretty sure many compilers can replace naive implementations of memcpy with one of the compiler's built-in optimized versions.
Re:Popcount CPU instruction by vnorilo on Monday September 09, 2019 @12:39AM (#20915241)
Yes; in fact memcpy/move are intrinsics in LLVM IR and are one of the more common targets of its idiom recognizer. Fun fact: many loop replacements and vectorizations depend on signed induction variable, so that the compiler doesn't have to prove it doesn't overflow. (Unsigned overflow is defined, signed overflow is UB and thus can be ignored)
Re:Popcount CPU instruction by account42 on Monday September 09, 2019 @04:06AM (#20916112)
If only you could specify overflow behavior and value range separately.