Calculations in source
Calculations in source
Hi, if my source code has 86400*7 in it (to calculate 7 days for a seconds query) does the compiler internally do the calculation with each run, or does it replace it with 604800 in the compiled executable? Wanting to optimise my program as much as possible.
Re: Calculations in source
To be safe, use a constant:
Code: Select all
#SecondsPerDay = 86400*7
Re: Calculations in source
The latter...BarryG wrote:...does the compiler internally do the calculation with each run, or does it replace it with 604800 in the compiled executable?
Code: Select all
MOV rax,604800
Et cetera is my worst enemy
Re: Calculations in source
Thank you both.