那我们就说这个循环的时间复杂度是O(loglogn) //Here c is a constant greater than 1for(inti =2; i <=n; i =pow(i, c)) {//some O(1) expressions}//Here fun is sqrt or cuberoot or any other constant rootfor(inti = n; i >0; i =fun(i)) {//some O(1) expressions} 如何求...
Code for those examples are availablehere. You can run those examples on your machine and check performance on your own. Published on Java Code Geeks with permission by Dominik Przybysz, partner at ourJCG program. See the original article here:Loops performance in Groovy Opinions expressed by Jav...