title: Speeding Up Java
body: <p>This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:</p>
  
  <ul>
  <li><p><strong>Firstly</strong>: Given an established Java project, what are some decent ways to speed it up beyond just plain in-code optimization?</p></li>
  <li><p><strong>Secondly</strong>:  When writing a program from scratch in Java, what are some good ways to greatly improve performance?</p></li>
  </ul>
  
  <p><strong>Please stay away from general optimization techniques unless they are <em>Java specific</em>.</strong></p>
  
  <p>I asked this about <a href="https://stackoverflow.com/questions/172720/speeding-up-python">Python</a> and <a href="https://stackoverflow.com/questions/177122/speeding-up-perl">Perl</a> earlier.  For Java I'm wondering what good tips/tricks are out there to improve performance and if there are any particularly good Java profilers.</p>