title: How to detect type unstable functions in Julia
body: <p><strong>Setup:</strong> Let's say I have a reasonably detailed piece of software (in Julia), involving the interaction of several modules. I feel like it is running slower than it should. Typically the <a href="http://docs.julialang.org/en/latest/manual/performance-tips/#write-type-stable-functions">first culprit to check for is type unstable functions</a>, i.e. functions where the compiler is unable to determine ahead of time what the output type will be.</p>
  
  <p><strong>Question:</strong> How can I detect these type unstable functions?</p>
  
  <p><strong>What I currently do:</strong> I use the profiling tools, e.g. the <a href="https://github.com/timholy/ProfileView.jl">ProfileView.jl</a> package of @tholy, to detect bottlenecks, under the assumption that type unstable functions will show up here (due to their excessive run-time). But what would be really nice is some sort of debugging tool that, after a routine is run, will spit out a list of functions where the compiler was unable to determine the output type ahead of time. Is this possible? </p>