2 ms·
Loops are a code smell ;) In this case the syntax lowers to a template which handles the iteration for you. It is not special, it gets treated the same by the
by mhh__ 5y ago
Loops are a code smell ;)
In this case the syntax lowers to a template which handles the iteration for you. It is not special, it gets treated the same by the compiler backend, but it will almost definitely be inlined & vectorized if the compiler is allowed to.
GCC and LLVM are actually clever enough to call memset for you if they deem it profitable.