I'm making a program whose speed needs to be the absolute fastest or users simply won't use it. I have a TON of examples I'm not 100% sure about. Ill start with this one.
Is it quicker to:
A) set a boolean->make a double-precision calculation->read the boolean and continue with code
or
B) make a double-precision calculation->see if the calculation is > 0 and continue with code
I want to assume B because it's not making an additional write to memory, but on the other hand it's handling a double-precision number twice...
Is it quicker to:
A) set a boolean->make a double-precision calculation->read the boolean and continue with code
or
B) make a double-precision calculation->see if the calculation is > 0 and continue with code
I want to assume B because it's not making an additional write to memory, but on the other hand it's handling a double-precision number twice...
Last edited: