Yosemite isn't badly optimized, it simply hasn't been optimized at all and I know this because of my radars with Apple on performance related issues. They basically said they're aware of it and optimizations are coming to improve the performance.
The biggest killer is the transparency, that've slowed down the UI latency but not the OS itself. They've gotten better over time, especially in 10.10.3 update for me. However, it's not the best it can be.
Yosemite is fine for most of the public, they don't know that it could be made much faster.
I've installed W10 on my Mac as well, it is definitely snappy and it is faster than a clean install of Yosemite for me, no doubts about it.
We just have to wait to see what Apple does with 10.11.