Bingo! That's what my post was about. I'd read statements to the effect that "W7 is much faster than XP" and was very suspicious of those. My test shows the statements to be utter bollocks under an oranges-to-oranges comparison.
No, not all oranges are the same.
The thing with Windows 7 is that, as already mentioned, it takes advantage of modern hardware better. If your 'orange' isn't modern enough, then XP may work as well, or better. A single-threaded CPU with HT would probably fall into that category.
However, with my Core2 Duo, I have found that Win7 distributes its work over the two cores better than XP does. With Core i7 it becomes even more apparent that XP really doesn't have a clue how to handle so many cores efficiently (not strange, given that such CPUs didn't exist back then, and it was difficult to try and design a scheduler for cases you couldn't test yet).
Also, the Windows 7 Aero GUI has background rendering and advanced GPU acceleration (and doesn't render directly to the screen, so it doesn't need to constantly redraw dirty rectangles, but just draws to textures and lets the zbuffer take care of it). Assuming you have a good enough video card (DX9 SM2.0+), Windows 7 will generally perform better with GUI-related tasks (eg, web browsing works nicer). But if your 'orange' doesn't have a good enough video card, you're dropping back to mostly software-rendered GUI stuff, and lose out to XP, whose older driver model has more acceleration for that case.
Likewise, Win7 has a higher minimum requirement, so not giving Windows 7 enough memory will push it into swapping to HDD more than XP would, which again would skew results towards XP.
But if your 'orange' has enough memory for Win7 to comfortably keep enough of itself resident at all times, you will start to see the benefits of Win7.
Eg, Win7 has IO prioritization: it doesn't randomly perform disk operations as they come in, the way XP does. Rather, it groups them together, and performs them in a more coherent fashion, which minimizes seek times, and improves overall disk read/write speed. You can literally hear the difference. When XP is doing a lot of disk IO, you hear your HDD scratching along. Do the same under Win7, and you hear a lot less 'scratching', and the system will remain more responsive.
Also, the default configurations of the OSes may not be the same. Eg, Windows XP does not come with any kind of antivirus enabled by default. Windows 7 however has Defender installed by default. This will negatively impact performance obviously. Either enable or disable it on both systems.
So yea, with the right orange-to-orange, you can see Win7 do some things better/faster than XP. But your oranges were probably not the right ones for Win7 to be able to showcase its abilities.