Wot Kim said.
I zig-zag occasionally. It reduces the gradient. That's why roads up steep mountain passes zig-zag.
There are hazards, thobut. I discovered, wandering
up a hill to Ardens Grafton, that a quiet car with a very patient driver
was following me
. My excuse is that I'd not climbed that one before with a few extra kg of fresh vegetables in the saddlebag, which was the purpose of the ride.
The "waste of time" aspect is complex. Obviously it's a bit of a put-down. But if you tour (or Audax, which is outwith my experience) on fixed, it becomes evident that speed up one steep hill is less important than time for the day's ride, and recovery for the following day.
[/pedant] It's not maths, it's physics. [pedant]