Hacker News new | comments | show | ask | jobs | submit login

Optimizing code is really the closest thing to experimental science in programming, because it really is a purely experimental exercise.

Restricting your variables is important, because you can't be sure exactly which change resulted in the improvement if you made a dozen changes(which is why threading is sometimes dangerous, because, like jwz's famous regex quote, it tends to turn one problem into many).

You're going to see things that don't make any sense, even if your gut says differently. This point is hammered home quite a bit. I've seen a case where removing what I thought was dead code reduced performance by a measurable amount... I still can't explain that one.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: