Infinite loops as bad taste
Posted Mar 3, 2007 1:20 UTC (Sat) by
pr1268 (subscriber, #24648)
In reply to:
Bad taste in programming by kleptog
Parent article:
Re: [GIT PATCH] HID and USB HID update for 2.6.21-rc2
Actually, I was taught that for(;;) is faster than while(1) since the former doesn't need to perform a logical evaluation, but the latter does. (Wouldn't this be a weird flame war debate?) I'm since convinced that this is old news, since my experiences hacking some C/C++ code with gcc -S and gcc -c show identical .s and .o files in either case (optimized or not).
I recently coded a loop as for(;;i++) { /* ... */ } (don't ask). :^)
(
Log in to post comments)