PerformanceTechniques

Version 6 by john.rose
on Mar 01, 2009 22:59.

compared with
Current by john.rose
on Oct 22, 2009 14:49.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View page history
Getting solid performance measurements is surprisingly tricky. Take [extra care with micro-benchmarks|MicroBenchmarks].
See below for a list of relevant presentations and papers.

Here is another slice on the same information, from another angle: [PerformanceTacticIndex].
h4. Constants
* Use constants when you can.
* If you are generating almost the same class many times in a row, with small variations, factor out the repeating parts into a superclass or static helper class.
* For small variations in the remaining part, consider using a single named class as a template and loading it multiple times as an [anonymous class|http://blogs.sun.com/jrose/entry/anonymous_classes_in_the_vm] with constant pool edits. Anonymous classes load and unload faster than named ones.

h3. Presentations and Papers
* Buckley & Rose, [Towards a Universal VM|http://wikis.sun.com/download/attachments/16418319/OOW-2009+Towards+A+Universal+VM.pdf], Oracle Open World 2009. Includes summary of HotSpot optimizations.
* Schwaighofer, [Tail Call Optimization in the Java HotSpot VM|http://www.ssw.uni-linz.ac.at/Research/Papers/Schwaighofer09Master/], Master’s thesis, Johannes Kepler University Linz, 2009. Pages 23-35 are a good introduction to HotSpot architecture.

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact