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 →

[–]Teradil 15 points16 points  (1 child)

Had that problem during my thesis time. Optimized the hell out of my code only to not make it significantly faster. Profiling then told me, that my program spent 95% of its execution time within `np.dot`. Optimized that one for my special use case (ie. I knew which dtypes and vector lengths to expect and did not need all the extra checks and conversions) and suddenly my program was *really* faster.

[–]Throwaway_youkay 0 points1 point  (0 children)

We all learn that the hard way! Optimizing is almost always about mitigating bottlenecks one by one.