3 ms·
If the compiler could prove you never read an array element before writing (like it is most of the time in Java, and should be all of the time in C), it could o
by pkolaczk 12y ago
If the compiler could prove you never read an array element before writing (like it is most of the time in Java, and should be all of the time in C), it could optimize the entire zeroing step away. Java does this very often. And initializing your variables close to the point of declaring them is a good practice in C anyways, which should make it easy for the compiler to analyze.