The Intel documentation suggests that the use of the /Qinit:zero and /Qinit:arrays compiler options will slow down execution times.
Does anyone have experience of this? I have just run some tests and find that using these options makes my program run a few percent faster not slower when using optimised code.
One situation where this can happen is when a nonlinear problem is being solved iteratively, and x = 0 happens to be a better initial guess than x = uninitialized.
You may experience two other consequences: larger EXE size, and slower program loading.
>> I have just run some tests and find that using these options makes my program run a few percent faster not slower when using optimised code.
This may depend on how you run your test. If you are timing section of code is timed on the 1st instance the improved runtime will be affected by the /Qinit:zero and /Qinit:arrays performing the first touch prior to your timed code. First Touch involves interaction with the O/S to map out the process's virtual addresses used to RAM and Page File. Additionally, the first touch will pre-charge your cache levels.
Run your timed section a few times within the same run session. Throw out the 1st time, average the remainder. In the case where your application does not loop your timed section, place your time snapshots in the shell/batch script.
The timing can also depend on background processes you are not necessarily seeing the same access to resources, I have a program that runs for between 150 and 300 seconds, it varies and it is not always apparent why - the program does the same thing time after time