Em ter., 2 de ago. de 2022 às 10:17, mahendrakar s <
mahendrakarfo...@gmail.com> escreveu:

> Hi Ranier,
>
> I'm pretty late to thread but would like to know about your claim in the
> thread:
> `All compilers currently have memset optimized.`
>
What did I mean, modern compilers.

I know one case of optimization where variable is not used after the memset.
>
Probably, the compiler decided to remove the variable altogether.
The most common is to remove the padding, when he understands that this is
possible and safe.
This does not mean that this will happen in all cases.
The point here is, this is only possible when using memset.


> Are the cases for which the optimization is done consistent across all the
> compilers?
>
Of course not. But it does not matter.

regards,
Ranier Vilela

Reply via email to