No. I think for(;;)
looks nicer. But they're the same.
Also see http://stackoverflow.com/questions/2611246/is-for-faster-than-while-true-if-not-why-do-people-use-it
Charles Salvia
2010-09-27 20:32:52
No. I think for(;;)
looks nicer. But they're the same.
Also see http://stackoverflow.com/questions/2611246/is-for-faster-than-while-true-if-not-why-do-people-use-it
With optimizations enabled, they will compile identically.
You should use whichever one you find more readable.