To add one more variable, the optimum speed depends on the headwind or tailwind. If you have a strong headwind you need to go faster to minimize the time you are subject to its detrimintal effects. If you have a strong tailwind you want to go slower to maximize the time you get its beneficial effects. This calculation needs to be meshed with the individual airframe's drag numbers based on altitude to come up with an optimum number.