Yes. But the algorithm that solve's in optimal time is not necesseraly polynomial in practice.

That's because the polynomial algo might have a constant factor that makes it very costly for small cases.

In any case, you're right to think that time of computation itself is economized.

In practice, what people do is to follow rules of thumb when taking these decisions, and these rules of thumb are not perfect but are good enough.

And then when they have to take similar decisions in the future, they may make some adjustments and refinements and thus get better results.

That's what is called in mathematics an adaptive approximation algorithm.

"Blood alone moves the wheels of history" - Dwight Schrute