I'm working on some of the problems in Programming Pearls and I'd like to get a sense for the runtime of various programs in Java. However the optimizing compiler is making this difficult. Is there a way to run javac on a Mac without having the compiler make any optimizations?
-
4Any optimizations made by javac are irrelevant, since the JRE will optimize the byte code at run-time.Andrew Thompson– Andrew Thompson2011-01-02 07:47:29 +00:00Commented Jan 2, 2011 at 7:47
-
The main optimisation the compiler does is expression evaluations e.g. 1 + 1 => 2 and "hi " + "there" => "hi there". It doesn't change the code.Peter Lawrey– Peter Lawrey2011-01-02 09:45:55 +00:00Commented Jan 2, 2011 at 9:45
Add a comment
|