javaperformancesecuritybackport

Are there security/performance issues with backporting Java code from 1.8 to 1.5?


I understand that older JVMs may have security/performance issues, however my question isn't about the JVM itself. Is it possible to introduce security/performance issues into code that was written for Java 1.8, but later backported to 1.5 because of the conversion process itself?

I didn't find too many people discussing this, however I did find some comments in the blog of the author of a Java 8 lambda backporting tool where he guesses that backporting Lambda expressions may actually increase performance slightly.


Solution

  • Here you can find a benchmark comparing JVM 1.6 to 7 and 8. I have an excerpt here:

    My observations:

    On the biggest dataset (Machine Reassignment B10), which dwarfs any of the other datasets in size, Java 8 is 20% faster than Java 7, which was already 17% faster than Java 6.

    In some cases, Java 8 is slower than Java 7. Specially for the course scheduling datasets, Java 8 is 6% slower than Java 7. Hopefully new releases of Java 8 will resolve this performance regression soon.

    On average, Java 8 is only 1% faster than Java 7. This while Java 7 is already 16% faster than Java 6.

    Despite that this is the first final release of OpenJDK 8, I did not find any regressions in Java 8. OptaPlanner’s examples are 100% reproducible, so as expected, the different JRE’s give the exact same results at every single iteration.

    It looks like java 8 is a good bit faster than 6, and I can only assume that java 1.5 was slower than java 6.

    As to your question about security, I have no idea. I have never used java EE or spring, or anything else that needed security for that matter.