One that minimizes or maximizes some quantity or combination of quantities, such as time, energy, distance, path, etc.
Optimal, adj. of → optimum.