Slower is theoretically most efficient on flat ground. On a slope it is complicated, you would need to compare losses due to gravity vs loss due to drag. It is much like a rocket in that case, there is a certain speed that minimizes energy loss at each stage of the trajectory which is not necessarily close to 0 but not necessarily close to the speed of light either.
With gas engines however a major factor is they have the highest torque in a specific rpm range. So as long as the transmission is not infinitely granular (continuously variable) there will be a subset of speeds that are more efficient than the rest, those that line up with the optimal rpm range for each gear.