I was working on a script the other day, and it was driving me nuts. It worked, sure, but it was just… slow. Really slow. I had that feeling that this could be so much faster if I could figure out where the hold-up was.

My first thought was to start tweaking things. I could optimise the data loading. Or rewrite that for loop? But I stopped myself. I’ve fallen into that trap before, spending hours “optimising” a piece of code only to find it made barely any difference to the overall runtime. Donald Knuth had a point when he said, “Premature optimisation is the root of all evil.”

I decided to take a more methodical approach. Instead of guessing, I was going to find out for sure. I needed to profile the code to obtain hard data on exactly which functions were consuming the majo…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help