Mac OS X is based on BSD, a variant of Unix/Linux.
Put any Linux OS on the same machine as Windows, and it will run faster as far as user interface and apps.
Because apple limit their operating system to work with a handfull of hardware variations, they can make it virtually bulletproof, Windows 10 has to deal with hundreds of different hardware variations and is bound to have the occasional problem
I've run into plenty of problems with Mac OS. If I google the issue all I find are pages of forums saying "Did you rest the PRAM? Yes? Well then i guess we can only hope Apple fixes it"
But with Windows if you've got a problem there are always answers to fix it out there.
Because the deprecate hardware only a few years old when they update the OS so they don't have to worry about compatibility, because they just don't support it anymore.
Macs are built with the fastest processors available, which is why they are way more expensive, too.
PCs are designed to be affordable, but they have pricey models that outperform Macs too. just not at Walmart.