I attack the beginning to take advantage of momentum (although this may or may not benefit overall)
then stay below threshold, until the last leg & go harder then if there is power left over.
On some rides I will go all out on one climb, & drag myself or be dragged the rest of the way.
More conservative approach for long & lots of climbing.
Chasing someone helps, but if it's long I don't look too far ahead, especially when hot.