Java for loop vs. while loop. Performance difference?

前端 未结 16 1610
长发绾君心
长发绾君心 2020-11-28 09:35

Assume i have the following code, there are three for loop to do something. Would it run fast if i change the most outer for loop to while loop? thanks~~

<         


        
16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 10:17

    It would only matter if you are using multi-thread or multiple processor programming. Then it would also depends on how you assign the loops to the various processors/threads.

提交回复
热议问题