• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hot spot optimization techniques?

 
stephan schweitzer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am searching for some information about the techniques used
in the hotspot vm. No general informations. What I really
need are informations about the techniques used in the virtual
machine and which preconditions must be fulfilled so that the
techniques are applicable.
thanks stephan
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you need this for? I do ask because this is a quite general (and possibly hard to answer) question, so knowing more about your needs might help us helping you...
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that if you license the Java source from Sun (you can do this at no cost), then you can see the HotSpot code for yourself.
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Stephan,
Do you google? A quick google turns up:
  • http://java.sun.com/products/hotspot/whitepaper.html
  • http://www.javaworld.com/javaworld/jw-03-1998/jw-03-hotspot.html


  • I came across a JavaOne presentation once, but I can't seem to find it right now.
    Hope this help.
    Regards,
     
    stephan schweitzer
    Greenhorn
    Posts: 9
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Ilja Preuss:
    What do you need this for? I do ask because this is a quite general (and possibly hard to answer) question, so knowing more about your needs might help us helping you...

    Thanks for your reply. Here are my questions about the optimization techniques:
    [list]First Problem:
    It seems to me that at least in the client version of the VM the following two source codes have a different performance (Source 2 seems to be better).
    Source 1:

    Source 2:

    Am I right or completely wrong? If I am right does this depend on the
    method inlining technique used in the VM?
    Anyway: Which methods are inlined and when are they inlined?
  • Second Problem:
    I have read that it is not advicable to use object pools with the

  • Java Hotspot VM. But I have used an iterator pool in my application
    and the performance has increased by 10 percent. To be more precise the
    code looks like this:

    and the classes which uses this iterator looks like this:

    Question: Is the increased performance dued to the not local life-time of the iterator objects or is this iterator pool also applicable to normal
    for-loops?
  • Third problem:

  • Because the cast-operators and the instanceof-operator may also
    decrease the performance I was wondering if there exists an optimization
    technique to optimistically eliminate these operators?

    Thanks Stephan
    [ October 27, 2003: Message edited by: stephan schweitzer ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic