gpt4 book ai didi

java - 将 Java 代码从 1.8 向后移植到 1.5 是否存在安全/性能问题?

转载 作者:行者123 更新时间:2023-12-01 11:37:14 25 4
gpt4 key购买 nike

我知道旧版 JVM 可能存在安全/性能问题,但我的问题与 JVM 本身无关。是否有可能将安全/性能问题引入到为 Java 1.8 编写但后来由于转换过程本身而向后移植到 1.5 的代码中?

我没有发现太多人讨论这个问题,但是我确实在 Java 8 lambda 向后移植工具的作者的博客中找到了一些评论,他猜测 Improve this question

最佳答案

Here您可以找到比较 JVM 1.6 与 7 和 8 的基准。我在这里摘录:

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.

看起来 java 8 比 6 快一点,我只能假设 java 1.5 比 java 6 慢。

关于你关于安全的问题,我不知道。我从未使用过 java EE 或 spring,或任何其他需要安全性的东西。

关于java - 将 Java 代码从 1.8 向后移植到 1.5 是否存在安全/性能问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29853080/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com