optimal

1. <mathematics> Describes a solution to a problem which minimises some cost function. Linear programming is one technique used to discover the optimal solution to certain problems.

2. <programming> Of code: best or most efficient in time, space or code size.