Hotspot JIT optimization and “de-optimization”: how to force FASTEST?

若如初见. 提交于 2019-12-04 12:44:20

Its impossible to trace with a "product" (read normal released) build, I would put the code through yourkit and see what's happening, hotspot will try to get the best possible optimisation at all times.

It will only go slower if you have code that forces de-optimisation in the jit, in the profiler you should be able to see this as things like large numbers of allocations, huge number of exceptions.

You should use VisualVM to find memory leaks and CPU usage problems, which comes with the JDK. It's pretty good for profiling, and has many plugins. You can also start VisualVM from Eclipse automatically when an application runs. Netbeans probably has something similar. It also doesn't impact performance much, providing that you use sampling rather than profiling.

I used to prefer JRockIt Mission Control over this (with JRockIt VM), but this does the job these days.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!