Profiling and accelerating Python