Frits van Bommel:

Thanks for your answers (and your work).

> That's trickier to get right, because the optimizer would have to look ahead 
> to 
> see the new memset call is always followed by the initialization, with no 
> reads 
> in between.

I understand, and that may be more complex to do if the code is multi-thread. 
It's not a very important optimization, because most times the initialization 
time is a small percentage of the time spent to process the array. But it may 
deserve to receive a look as a medium-low-priority optimization anyway.

Bye,
bearophile

Reply via email to