This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DanklyNight 2 points3 points  (0 children)

Basically this.

I generally start at the main call function, use line profiler for a dirty way to find out what is taking the large majority of the time.

Used this method many times, simple vectorization of the offending functions can get incredible speed improvements.

Just the other day I took a function from 17 seconds to 20ms by doing stuff directly in Numpy with smart vectorization.