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.
I currently have a M3 Pro for a work laptop. The performance is fine, but the battery life is not particularly impressive. It often hits low battery after just 2-3 hours without me doing anything particularly CPU-intensive, and sometimes drains the battery from full to flat while sitting closed in a backpack overnight. I'm pretty sure this is due to the corporate crapware, not any issues with Apple's OS, though it's difficult to prove.
I've tended to think lately that all of the OSes are basically fine when set up reasonably well, but can be brought to their knees by a sufficient amount of low-quality corporate crapware.
If you have access to the Defender settings, I found it to be much better after setting an exclusion for the folder that you clone your git repositories to. You can also set exclusions for the git binary and your IDE.
That M2 MBA however, it only feels sluggish at > 400 Chrome tabs open because only then swapping becomes a real annoyance.
[1] https://9to5mac.com/2022/07/14/m2-macbook-air-slower-ssd-bas...
[2] https://www.tomshardware.com/laptops/macbooks/m5-macbook-pro...
[3] https://www.reddit.com/r/AcerNitro/comments/1i0nbt4/slow_ssd...
Except that you can replace Windows with Linux and suddenly it doesn't feel like dogshit anymore. SSDs are fast enough that they should be adding zero perceived latency for ordinary day-to-day operation. In fact, Linux still runs great on a pure spinning disk setup, which is something no other OS can manage today.
With Windows, you're probably still getting SATA and not even NVMe.
The options in that space are increasingly dwindling which is a problem when supporting older machines.
Sometimes it is cheaper to get a sketchy m2 ssd and adapter than to get an actual sata drive from one of the larger manufactures.