On 8/1/07, Mukund Deshmukh wrote: > While writing C code for ARM, I would prefer if() else if() or switch > command. > The while(true) + if() would add extra condition checking and would be > slower.
How will it add an extra condition? The compiler is smart enough to understand while( true ) is an unconditional loop and will not generate the code for a condition check instead it'll just put a JMP instruction back to the start of the block. So no overheads there. -- Regards, Dinesh A. Joshi -- http://mm.glug-bom.org/mailman/listinfo/linuxers

