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.
[ Parent
| on HN ]
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)