 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ripunjay Tripathi Guest
|
Posted: Wed Feb 09, 2011 3:14 am Post subject: Code Transformations that JVM applies |
|
|
Friends,
I was reading a paper "The Java Memory Model" by Pugh and Manson,
where I saw a statement which suggests that JVM can apply certain
optimizations/transformations while producing native code.
I am new to java and need help in understanding what kind of
transformation can they be ?
Any pointers to resources are welcome.
Ripunjay Tripathi |
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Fri Feb 11, 2011 5:30 am Post subject: Re: Code Transformations that JVM applies |
|
|
On Tue, 8 Feb 2011 19:14:43 -0800 (PST), Ripunjay Tripathi
<ripunjay.tripathi (AT) gmail (DOT) com> wrote, quoted or indirectly quoted
someone who said :
| Quote: | I am new to java and need help in understanding what kind of
transformation can they be ?
|
Java was designed to give the JVM considerable freedom, so long as the
net effect is the same. Java avoids constructs like struct overlays
that inhibit optimisation.
Examples of things it can do:
1. store strings in 8, 16 or compressed format or a mixture
2. use 32 or 64 bit addresses.
3. store bits packed in various ways
4. numbers can be stored big or little ended.
5. inline methods
6. standard optimisations you would do in a C compiler.
7. optimise the true size of StringBuilders, ArrayLists etc.
8. monitor interpreted code running to gather stats to optimise the
machine code generated.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Your top priority should be fixing bugs. If you carry on development,
you are just creating more places you will have to search for them. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|