过时的Java优化技巧 [英] Obsolete Java Optimization Tips

查看:110
本文介绍了过时的Java优化技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java编译器已经淘汰了许多性能提示,尤其是 Profile-guided optimization 。例如,这些平台提供的优化可以大大(根据来源)降低虚拟函数调用的成本。 VM也能够进行方法内联,循环展开等。

There are number of performance tips made obsolete by Java compiler and especially Profile-guided optimization. For example, these platform-provided optimizations can drastically (according to sources) reduces the cost of virtual function calls. VM is also capable of method inlining, loop unrolling etc.

您使用的其他性能优化技术仍在应用但实际上已被更多优化机制淘汰现代JVM?

What are other performance optimization techniques you came around still being applied but are actually made obsolete by optimization mechanisms found in more modern JVMs?

推荐答案

方法和方法参数的最终修饰符对性能没有任何帮助。

The final modifier on methods and method parameters doesn't help with the performance at all.

另外, Java HotSpot wiki 给出了很好地概述了HotSpot使用的优化以及如何在Java代码中有效地使用它们。

Also, the Java HotSpot wiki gives a good overview of the optimizations used by HotSpot and how to efficiently use them in Java code.

这篇关于过时的Java优化技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆