In an ideal case, only the ratio matters. If two different gear combinations give you the same ratio, the effort to maintain a given speed would be the same.
In a real-life bicycle, there are slight differences:
[li]The rear derailleur has a spring-loaded mechanism to take up chain slack, but it has limited capacity to do so. If you use the largest front gear and largest rear gear, the derailleur will be at its limit, and it may not work very smoothly. With the smallest/smallest combination the chain may be so loose that it bounces around.[/li][li]The largest front gear is on the right, and the largest rear gear is on the left. So a large/large or small/small combination will cause the chain to be slanted, which reduces efficiency.[/li][li]There is some experimental results that say for a given gear ratio, smaller gears are more efficient. (Sorry, no cite right now, I’ll dig it up later.) Possible explanation is that chain vibration is a major source of energy loss, so the higher the chain tension, the smaller the loss. And for a given bike speed and power, smaller gears results in higher chain tension.[/li][/ul]