• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hot spot optimization techniques?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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 ]
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic