How "duplicated" Java code is optimized by the JVM JIT compiler?

Posted by Renan Vinícius Mozone on Stack Overflow See other posts from Stack Overflow or by Renan Vinícius Mozone
Published on 2010-06-17T23:10:01Z Indexed on 2010/06/17 23:13 UTC
Read the original article Hit count: 445

Filed under:
|
|
|
|

I'm in charge of maintaining a JSP based application, running on IBM WebSphere 6.1 (IBM J9 JVM). All JSP pages have a static include reference and in this include file there is some static Java methods declared. They are included in all JSP pages to offer an "easy access" to those utility static methods. I know that this is a very bad way to work, and I'm working to change this. But, just for curiosity, and to support my effort in changing this, I'm wondering how these "duplicated" static methods are optimized by the JVM JIT compiler.

  • They are optimized separately even having the exact same signature?
  • Does the JVM JIT compiler "sees" that these methods are all identical an provides an "unified" JIT'ed code?

© Stack Overflow or respective owner

Related posts about java

Related posts about jsp