I'm totally amateur but my understanding is competitive types are in it to win, which means being across the line first. This answer is race-focussed.
The answer varies slightly depending on whether you're in a bunch or riding solo.
A racer really wants to stay with the bunch in order to maximise aero advantage and cooperative assistance. If the racer "falls of the back" then its very much harder to catch up the group.
So a climb is a great way for the Strategically-Minded to break up the group. A strong climber might rest up a bit in the approach to the climb, and then blast off the front when the road pitches up or when the group looses its initial momentum from the flat.
The point is to leave someone behind so they can't catch up without a herculean effort.
Most riders downhill at roughly similar speeds so once the front rider has gained 10 seconds lead that could be 50-100 metres gap once they're both on the downhill.
Pacing doesn't really come into it in a race - you keep up, or you drop off. If that means you go "into the red" on a climb then so be it - recover on the downhill, or realise you entered a race beyond your current ability.
This is why its really important to know the course in a race, having either ideally ridden it before or at least had a good study of the route map via google street view or by topological maps.
Riding competitively solo (like a time trial or setting a PR in strava) is all about getting the best overall time for the measured length. Since there's no pack there's no assist from being in a bunch. Instead you have to hit the start of the segment at a decent speed and maintain it as high as possible. Don't wear yourself out getting to the race either... take that easy. If the grade pitches up, don't mash, get up and put some extra power in to maintain a high speed as possible. After the segment you push through the end point and go on a bit, then you can slow down.
Some of my best hill climbs are when I've been chasing someone, not necessarily someone I know, just someone ahead of me who has a decent turn of speed. (ie they've just passed me :)