AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Code Transformations that JVM applies

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JVM, native methods and hardware
View previous topic :: View next topic  
Author Message
Ripunjay Tripathi
Guest





PostPosted: Wed Feb 09, 2011 3:14 am    Post subject: Code Transformations that JVM applies Reply with quote



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





PostPosted: Fri Feb 11, 2011 5:30 am    Post subject: Re: Code Transformations that JVM applies Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JVM, native methods and hardware All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.