> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: OT if/else or not if/else
> > Actually, a good compiler should generate the same code for switch > > and if ... else if, assuming the boolean expressions used with the > > ifs are compatible with a switch operand. > Do you know of such a compiler (for Java)? I've never seen a compiler > generate a switch bytecode when a "switch" statement wasn't present in > the original Java source. I'm not talking about the front end, but rather the native code generators after optimization (e.g., the C2 compiler for the Oracle JVM). The bytecodes aren't representative of what actually gets executed. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org