In my opinion people do two mistakes when comparing the two, that makes them prefer Mac
1. They compare cheap windows laptop to very expensive Mac, they think if they will pay 2k for a laptop then windows isn't worth it, but actually a 2k windows laptop will give you much higher performance than a 2k Mac
2. They always install AV (even more than one) in windows as they think it's not secure, while they don't with Mac, and actually AV make your machine much slower specially when compiling code and installing dependencies
So in nutshell, same price Mac and windows laptop both without AV will result in much faster windows