title: How can I speed up my Perl program?
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 Perl 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 Perl, what are some good ways to greatly improve performance?</p></li>
  </ul>
  
  <p>For the first question, imagine you are handed a decently written project and you need to improve performance, but you can't seem to get much of a gain through refactoring/optimization.  What would you do to speed it up in this case short of rewriting it in something like C?</p>
  
  <p><strong>Please stay away from general optimization techniques unless they are <em>Perl specific</em>.</strong></p>
  
  <p>I asked this about <a href="https://stackoverflow.com/questions/172720/speeding-up-python">Python</a> earlier, and I figured it might be good to do it for other languages (I'm especially curious if there are corollaries to <a href="http://psyco.sourceforge.net/" rel="nofollow noreferrer">psycho</a> and <a href="http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/" rel="nofollow noreferrer">pyrex</a> for Perl).</p>