javac
will only do a very little optimization, if any.
The point is that the JIT compiler does most of the optimization – and it works best if it has a lot of information, some of which may be lost if javac
performed optimization too. If javac
performed some sort of loop unrolling, it would be harder for the JIT to do that itself in a general way – and it has more information about which optimizations will actually work, as it knows the target platform.
Related Contents:
- Why does array[idx++]+=”a” increase idx once in Java 8 but twice in Java 9 and 10?
- ant warning: “‘includeantruntime’ was not set”
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- Declaring variables inside or outside of a loop
- In which language are the Java compiler and JVM written?
- Why does a Java class compile differently with a blank line?
- What is the difference between javac and the Eclipse compiler?
- javac option to compile all java files under a given directory recursively
- Does the ‘java’ command compile Java programs?
- javac not working in windows command prompt
- Optimising Android application before release [closed]
- Most efficient way to make the first character of a String lower case?
- Print All JVM Flags
- What is the gain from declaring a method as static
- Why does the JVM still not support tail-call optimization?
- Is the creation of Java class files deterministic?
- Java: How can I compile an entire directory structure of code ?
- How to intentionally cause a custom java compiler warning message?
- Fastest way to put contents of Set to a single String with words separated by a whitespace?
- Java Integer compareTo() – why use comparison vs. subtraction?
- In ArrayBlockingQueue, why copy final member field into local final variable?
- Fastest way to strip all non-printable characters from a Java String
- > vs. >= in bubble sort causes significant performance difference
- Maven Unable to locate the Javac Compiler in:
- Is my Android App Draining Battery?
- Unable to locate an executable at “/usr/bin/java/bin/java” (-1)
- What is the $1 in class file names?
- JDK 11.0.2 compilation fails with javac NPE on anonymous parameterized class type inference
- What’s the fastest way to read from System.in in Java?
- What to do with Java BigDecimal performance?
- How to write code in Java 11, but target Java 8 and above?
- Why to use StringBuffer in Java instead of the string concatenation operator
- Is there a performance difference between Javac debug on and off?
- Efficiently compute Intersection of two Sets in Java?
- Integers caching in Java [duplicate]
- Make javac treat warnings as errors
- How can I suppress javac warnings about deprecated api?
- In Java 8, why were Arrays not given the forEach method of Iterable?
- Is this valid Java?
- Difference in behaviour of the ternary operator on JDK8 and JDK10
- What can I do in Java code to optimize for CPU caching?
- is it possible to disable javac’s inlining of static final variables?
- Profiling a Java Application in Eclipse? (plug-in) [closed]
- ResultSet: Retrieving column values by index versus retrieving by label
- Why does the Java compiler 11 use invokevirtual to call private methods?
- Java split String performances
- What is sjavac, who is it for and how do I use it?
- Do java finals help the compiler create more efficient bytecode? [duplicate]
- What are the cases in which it is better to use unconditional AND (& instead of &&)
- Converting Map to Map