[PATCH] memset 0 in obscure is optimized away by compiler

Harald Becker ralda at gmx.de
Wed Apr 16 17:14:05 UTC 2014


Hi Tito !

>I've tried to find out if memset is really optimized away in
>this case with some test code that I've compiled with :

What is wrong with optimization of code, e.g. replacing call to
memset by a quick loop which does same thing even faster than a
function call? ... beside that such optimization needs normally a
bit more of space it is faster and does same thing as original
function call. Try using size optimization (-Os) to avoid
replacing function calls by inline replacements.

--
Harald


More information about the busybox mailing list