My work laptop will literally struggle to last 2 hours doing any actual work. That involves running IDEs, compiling code, browsing the web, etc. I've done the same on my Macbook on a personal level and it barely makes a dent in the battery.
I feel like the battery performance is definitely down to the hardware. Apple Silicon is an incredible innovation. But the general responsiveness of the OS has to be down to Windows being god-awful. I don't understand how a top of the line desktop can still feel sluggish versus even an M1 Macbook. When I'm running intensive applications like games or compiling code on my desktop, it's rapid. But it never actual feels fast doing day to day things. I feel like that's half the problem. Windows just FEELS so slow all the time. There's no polish.