Another 2p worth...
If one uses one of the online "bicycle calculators" looking at energy, speed, gradient, wind, time , etc. you can run various scenarios. Some time ago I tried it to see what the most efficient use of energy was for hilly longer rides I tend to do in the Peak District (being a slowish old git most of the time!)
If you compare, for example, using a constant 180W as opposed to 50W downhill, 150W on the level and 220W uphill you will find that the latter scenario uses about 20% less energy overall and is actually 4% faster... (using my parameters; YMMV )
Practically, this seems to be valid too - the easiest way to improve times on hilly rides seems to be to expend the excess energy on the climb sections...
Perhaps, therefore, the answer is to practice using every hill as an interval and the rest as recovery?
good to see some calculations behind my theory . i always felt that it pays to put in more effort up the hills as it's not cancelled out by air resistance. you need to pedal exponentially harder on the flat to win the same amount of time.
That ignores mass and heat dissipation. I can work at 150bpm for 30 minutes on the flat, but much less than that uphill before I 'blow'. Similar effects happen on tandems. Climbing is useful for extending your tolerance of heat, due to the lack of cooling air.
Time triallists such as Froome and Wiggins can only climb effectively with a very low BMI, which is why they find it difficult to replicate their successes. It's uncomfortable to be that thin, and unhealthy. It's not only power to weight, but proximity of blood vessels to the skin for cooling.
Climbing short hills hard makes you better at sprinting, ideal for getting on the wheel of a passing group. Around here we have longer hills where heat becomes an issue.