http://pynash.org/2013/03/06/timing-and-profiling/