I'm not good with numbers, but I can tell you JRun doesn't optimize your code. The compiler does some, and the JVM will do more. If you're using the default compiler with JRun, it's Jikes. You can switch to javac if you like. There's a K.B. at the Allaire Knowledge Base that explains how. However, javac might make the same optimization, so I would try running a standalone class through both Jikes and javac with your math problem and see if they make the same optimization. At the JVM level, optimization is out of your control, so, again, if there's something wrong with your logic, and you manage to get past the compiler with it, you still might get caught when the JVM tries to optimize it. Scott Stirling Allaire Corporation http://www.allaire.com/developer/jrunreferencedesk/ > -----Original Message----- > From: Eric Larson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 16, 2000 6:06 PM > To: JRun-Talk > Subject: Code Optimizer Breaks my code??? > > > > When Jrun creates a servlet from a jsp page called by a > servlet it applies > a code optimization that can break (and has broken) my code. > > To wit: > > if (a != null && b == null) { > c=a; > if (a == 7) { > c = 4; > } > } > > jrun optimizes this to something like: > > if ( b == null && a == 7) { > c = 4; > } else { > c =a; > } > > THIS SEEMS WRONG. If a == null the non - optimized code > works, but the > optimized code throws an exception. > > Any comments?? > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Your ad could be here. Monies from ads go to support these > lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
