while(true) versus for(;;) [duplicate] December 5, 2023 by Tarik With optimizations enabled, they will compile identically. You should use whichever one you find more readable.