3 ms·
There's something vicariously gratifying about posts like this. Optimization is some of the most fun programming to do: you have a crystal clear objective goal
by munificent 11y ago
There's something vicariously gratifying about posts like this. Optimization is some of the most fun programming to do: you have a crystal clear objective goal to go for and once you've got a profiler set up it's just:
1. Find slow thing.
2. Make faster.
3. See benchmark improve.
Some of the most satisfying coding I've done has been optimization.
- steveklabnik 11y agoI agree with this, but there's one more aspect: you learn something. Deeply. "Oh, I didn't realize that would do _that_..." It's also taught me just how much we can guess incorrectly the first time. It's a skill you can get better at. "Profile first" is a good heuristic, but "guess first, profile second, _then_ do the work" means you train yourself too. I'm still very much a noob at this.
- munificent 11y agoI think every time I've used a profiler, it's taught me that me intuition of where the bottleneck was was completely wrong. It's a humbling experience, in a good way.
- golergka 11y agoWell, that's only satisfying when your other thing doesn't get slower/worse because of that. And then turns out you're out of low-hanging optimization fruit and you have to choose trade offs.