title: Programmatically obtaining Big-O efficiency of code
body: <p>I wonder whether there is any automatic way of determining (at least roughly) the Big-O time complexity of a given function?</p>
  
  <p>If I graphed an O(n) function vs. an O(n lg n) function I think I would be able to visually ascertain which is which; I'm thinking there must be some heuristic solution which enables this to be done automatically.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>Edit:</strong> I am happy to find a semi-automated solution, just wondering whether there is some way of avoiding doing a fully manual analysis.</p>