I feel like even if the distances are equal, it's faster to walk a bike up a steep grade and bike the rest flat than it is to bike up a moderate grade the whole way. This topic has probably been discussed somewhere else.
My reasoning for the bike-hike being faster is that legs are designed for it. Legs are only inefficient on flatter ground because you have no equivalent of high gear (like extendible legs), so all that torque is going to waste.
Legs have to start, go up, go down, stop.
Wheels go brrrrr.