Does it make sense to recompile a project with a new (java 11) target version from a performance perspective if it will be run on a java 11 while source code will remain the same (java 8)?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
What are pitfalls to run java 8 bytecode on a newer JVM?
Update:
Code optimizer is one of the phases of compilation phase, where:
- It helps you to establish a trade-off between execution and compilation speed
- Improves the running time of the target program
- Generates streamlined code still in intermediate representation
- Removing unreachable code and getting rid of unused variables
- Removing statements which are not altered from the loop
- etc
read more: https://www.guru99.com/compiler-design-phases-of-compiler.html
So, I wonder if it's a big difference between different compilers (benchmarks), would be nice to have a full list of all optimization happens on a compilation phase