[Question] What to optimize for in life?

I listened to an interview with Patrick Collison were he claimed that when coding one should always optimize for speed—even when speed is not an issue. (Presumably because it leads to good coding practices, clean code, less build up of unnecessary functionality etc.)

Assuming that is correct—and I think there is something to it—it makes me wonder: is there something similar that one could optimize for in life? Life is such a multivariate thing that it can at times be hard to know what to prioritize.

What parameter is a candidate for having most positive side effects on your life when optimized?