Thanks for reply
Rob Spoor wrote:The way it works now is pretty good.
Thats absolutely perfect and we all aware of this.
Rob Spoor wrote:It does compile the byte-code internally, but when the JVM exits that data is discarded again.
Now here is my confusion does it compile every time when particular resource is demanded for or does it do it only for once or how?
Rob Spoor wrote:Because that means you will have to compile your code for each platform.
This is what JVM does for us for any platform, thats fine. Now the same question again does it compile code every time for same resource again and again e.g. if we create
String Object 100 times will JVM convert byte-code for String to binary 100 times?
Rob Spoor wrote:Or perhaps I understood you wrong. Did you mean that the JVM uses byte-code for each class, but compiles that internally and stores that somewhere to use it for future use?
thats the question for which i am searching answer for.
Rob Spoor wrote: If so, then that has some overhead too. If the class changes the JVM would need to check if the compiled data is still up-to-date.
wont those overheads will be lesser than converting byte-code to binary, if it does this again and again?
Rob Spoor wrote:And what about the storage required if the JVM has encountered hundreds of classes?
True i had not thought of this.