The OS does play some part; when win2000 was released I did quite a bit of benchmarking to compare performance between win98se and win2kpro. Now of course part of that performance differential may have been down to driver immaturity, but at the end of the day, if those issues are never fixed then whether it is down to the driver or OS itself is somewhat irrelevant (i.e. drivers are an integral part of the OS).
I think what you are driving at in this thread is that the primary reason PCs give 'bad' performance is because it is 'impossible' to optimise for specific hardware, because of the wide range of configurations people have. Ironically if you go back 10+ years to when DOS was still used for quite a few games, developers were actively coding for specific pieces of hardware (soundcards, graphics cards, displays etc). Even under windows we had this to some extent with proprietary graphics APIs like Glide, before D3D/OGL took over. Anyway, point being that even as late as 1998 I was actively choosing to run some games under DOS due to the superior performance relative to the win95 version. So in actual fact we could consider MS-DOS to be a gamers OS with it's low memory footprint and direct hardware access