Re:Zeroing Memory is Hard: VC++ 2015 arrays
by userbinator on Monday July 18, 2016 @07:16AM
(#12114377)
If you ask the compiler to optimise for size you should really be getting a REP STOS for anything that needs more than the ~3 instructions which that takes.
(It's not the fastest way for small sizes --- it actually is for larger sizes, just like REP MOVS --- but the user asked for smaller, not faster code.)
(It's not the fastest way for small sizes --- it actually is for larger sizes, just like REP MOVS --- but the user asked for smaller, not faster code.)