Java代码编译器优化 [英] Java code compiler optimization

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

问题描述

我想知道 - 给定一个java代码,我如何看到Java编译器如何优化它?

I was wondering - given a java code, how can I see how the Java compiler optimizes it?

有没有任何JDK工具?

Are there any JDK tools for this?

尝试到google,但没有相关的。

Tried to google, but nothing relevant came up.

推荐答案

编译器优化,只需反编译字节码,例如使用 javap JD

To see what the compiler optimized, simply decompile the bytecode, for instance with javap or JD.

要了解即时编译器优化的内容,请激活调试日志记录(并阅读反汇编的机器代码)。

To see what the just in time compiler optimized, activate debug logging (and read the disassembled machine code).

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

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