While working on #3641 I've noticed that the compiler currently does the optimizations on its own most of the time for 1 and 2 byte elements.
The exception I found is a case with zero value and global variable, see DevCom-10334032.
But otherwise the optimization is there - either vectorized implementation, or rep stos or memset call.
However, the optimization is not engaged for larger types, specifically 4 and 8 bytes, except for compile-time zero.
For compile-time zero, compiler substitutes memset on its own.
I'm not sure how to proceed:
While working on #3641 I've noticed that the compiler currently does the optimizations on its own most of the time for 1 and 2 byte elements.
The exception I found is a case with zero value and global variable, see DevCom-10334032.
But otherwise the optimization is there - either vectorized implementation, or
rep stosormemsetcall.However, the optimization is not engaged for larger types, specifically 4 and 8 bytes, except for compile-time zero.
For compile-time zero, compiler substitutes
memseton its own.I'm not sure how to proceed:
wmemsetforfilloptimization #3641 without merging ?std::filloptimization ?memsetoptimization ?