Code cleanup in general is the same for me, but it’s really hard to justify putting much time into that when running your own company solo.
Then there was a system for benchmarking the software as a whole on a wide variety of architectures, including NUMA. With lots of plots and statistics.
Usually you’d eventually end up at a point where the improvements are below the noise floor or they help on some systems and cause regression on others. The rule was usually “no regressions”
VTune for multithreading optimization. Built a fibers and lockfree system for efficient scheduling.
Unfortunately I had to give up when I was still 10 times slower than the reference lol
Interesting. For me, it's refactoring.
It seems there's less appreciation for this kind of work these days.
I try to keep a few of these tasks lying around marked “unblocked” in case I need to unwind. It keeps me from doing it right after noticing, which is an extra bonus.
1. Tracking i.e. navigating through jungles for hunting or find where the bottleneck is.
2. The thrill of the hunt. The joy after finding the hotspot or the bottleneck. It makes your day.
3. The actual hunt i.e. shooting an arrow/spear or using clever way of fixing.
4. Brag about the hunt or writing a blog post or tech talk on how difficult and awesome the hunt was.
Also optimizing a critical path has multiple takers in the org:
1. Product Managers are happy due to improved user experience.
2. Management is happy as in some cases it actually saves a lot of money.
3. Your boss is happy because he/she gets to score points as "team achievement" when evaluation is around the corner.
4. Engineers get to do nerdy things which otherwise would not find traction in the org.
All in all its a win-win-win-* situation.
And when you finally "fixed" the issue through optimization, your mind allowed itself to let go of these open loops (borrowing the GTD terminology), leading to relaxation?
I've since noticed this many times. Optimizing is like meditation to me. It's very mechanical (measure), with a sprinkle of creative work (once you know what is slow, it's quite obvious how to make it faster, but just challenging enough to be engaging), and it has a very nice tight feedback loop: Something is slow. I make a change. Now it's fast. Next.
Optimizing is my happy place.