modify to achieve maximum efficiency in storage capacity or time or cost; "optimize a computer program"