Re: Advantage of switch-case

2009-04-16 Thread Joe Buck
On Thu, Apr 16, 2009 at 10:12:10PM -0700, Joe Buck wrote: > I don't know how much of that work got into the compiler, probably > it isn't in the 4.2.x version we're using now. I should clarify that remark. In production work right now I'm not using the current gcc, and am not using profile-direct

Re: Advantage of switch-case

2009-04-16 Thread Joe Buck
On Thu, Apr 16, 2009 at 09:07:58PM -0700, Shameem Ahamed wrote: > Is there any advantage of using switch-case over if-else. I mean any internal > optimizations, gcc can do on a Linux i386 machine?. The optimizations in question are architecture-independent, though there would undoubtedly be proc

Advantage of switch-case

2009-04-16 Thread Shameem Ahamed
Hi All, Is there any advantage of using switch-case over if-else. I mean any internal optimizations, gcc can do on a Linux i386 machine?. Is it saving any machine instructions for us ?. Regards, Shameem _ So many new options, so