2 ms·
Some functions may have negative complexity and I’m worried for my crypto
- gus_massa 8y agoIs this just a very smart optimizer that can reduce tot=x+x+x+x+x+x+x+x+x+x+x+x+x+x+x to x2=x+x x4=x2+x2 x8=x4+x4 tot=x+x2+x4+x8 or I am missing something? Note that the first code is O(N=15) and the second one is O(log(N)=4).