3 ms·
If all that is required is a super large constant (as in some cases), why not assume the large constant, do the calculation, then factor out the large constant?
by angel_j 7y ago
If all that is required is a super large constant (as in some cases), why not assume the large constant, do the calculation, then factor out the large constant?
- nabdab 7y agoBecause the “faster” algorithm is faster than the “slow” algorithm in the range where this constant is added... but not faster than just applying the “slow” algorithm directly. So the only thing you would achieve is to slow down the calculation overall.