2 ms·
FWIW, GCC and Perl generate the same code for both. http://stackoverflow.com/questions/885908/while-1-vs-for-is-there-a-speed-difference http://stackoverflow.c
by morsch 14y ago
FWIW, GCC and Perl generate the same code for both.
http://stackoverflow.com/questions/885908/while-1-vs-for-is-there-a-speed-difference http://stackoverflow.com/questions/885908/while-1-vs-for-is-...
- barbs 14y agoInteresting. Looks like they'd be the same performance wise, since for (;;); is the same as { while (true) { ; ; } } I originally asked this question cos it's used this way in first C program in the link. Bit of a tangent though :P