2D results in Windows 7 seem poor compared to previous versions of Windows, why is this?
Most of the 2D benchmark test results in PerformanceTest haven't changed much in Windows 7 compared to Vista with the exception of the solid and transparent vector tests, which have shown a significant reduction in speed compared to Vista. The reason for this seems to be an intentional decision made by Microsoft that has significantly impacted the direct window rendering techniques used in these tests (known as GDI+).
According to information from Microsoft they have restructured the internals of the Windows graphical subsystem to make more efficient use of RAM on the videocard and less use of main memory. The consequence of this seems to be that when a large number of windows are in use much less system RAM is required (a good thing), but there is a side effect of negative performance impact when data needs to be read back from video memory. This negative impact can be seen in the results of the 2D vector tests in PerformanceTest.
Further, in Win7 the locking of operating system resources in done at a finer level. So more locks are used, but they are held for a shorter period. Microsoft describe this as, "GDI concurrency and lock refactoring to enable more efficient multi-threaded access to GDI". For an individual single threaded application this can also result in a slight performance decrease. But when multiple applications or threads are all updating their windows at the same time, the user interface will appear to be more responsive (as one application won't block screen updates being done in another application nearly as often).
Different Windows applications use different methods of drawing to the screen. Some applications render directly to the window, which is the same method used in the vector tests in PerformanceTest (GDI+ to a hWnd). These application will likely suffer a performance hit in Win7. Other applications render to a buffer in main memory and then use a method known as bitblt to push the final image to the screen buffer (GDI+ to a DIB section then bitblt). This method is known as double buffering. Most large commercial applications (such as Word and Photoshop) use this later method and will not suffer much if any performance degradation in Win7. There is a discussion of this on Microsoft's graphics performance blog.
It has been reported elsewhere that the WDDM V1.1 video card drivers in Windows 7 have additional hardware acceleration for GDI compared to WDDM 1.0 used in Vista, and so should be faster. But out of the 100s of GDI functions only 6 functions are accelerated in hardware in Win7. These are, BitBlt, ColorFill, StretchBlt, AlphaBlend, Cleartype fonts & TransparentBlt. The other functions are executed on the CPU. It should be noted that Windows XP had better 2D hardware acceleration (but less eye candy) than Vista. Arguably in some circumstances, XP also had better GDI acceleration than Win7.
The 2D benchmark tests in PerformanceTest are single threaded and don't use huge amounts of RAM. So the potential improvements in Win7 are not reflected in the benchmark results. But the negative side effects can be seen. In the real world the Win7 interface as a whole should feel more responsive (especially in low RAM situations) even if some individual applications might run slower.
In PerformanceTest 8 a Direct2D test was added. Direct2D is a new 2d graphics API for Windows 7 (and Vista with updates). The addition of this test should show an area where Windows 7 performs well and narrow the apparent gap in test results between the different version of Windows.
Other factors should also be considered when comparing 2D performance between different versions of Windows. These are,
- Different video card device drivers versions can impact performance.
- CPU performance also has a big impact on 2D rendering.
- Different versions of Windows have different visual effects. XP can look rather plain compared to Vista, but the plain look can be faster to render on the screen.