Em Quarta-feira 21 Outubro 2009, às 23:38:06, você escreveu: > I have done some more rigorous benchmarking to better understand the > graphics performance differences between OSX and Windows, and according > to various methods. > I have tested drawing using the raster engine or the native engine > (on windows, it's the same), and drawing directly or indirectly > via a QImage or QPixmap. This for both OSX and Windows. [snip] > Engine QImage QPixmap OSX Windows > =========================================================== > native 42 14 > native yes 28 15 > native yes 44 15 > > raster 30 14 > raster yes 33 15 > raster yes 34 15 > > What these figures show mainly is: > > * Drawing under Windows is between 2 and 3 times faster (!).
That's probably because of the compiler, if you were using MSVC, like you found yourself. Also note that your times were the same for one reason: there's no native engine on Windows. By default, Windows uses the raster engine and the only alternative is OpenGL. > * Raster engine is preferred on the mac, unless one draws > into a QImage, which is then the best solution. > I hope I can test soon on snow leopard to see if there is an improvement. That's probably just a glitch in the testing, because QImage uses the raster engine to perform painting. In fact, that's what the entire raster engine is about: QImage. But you may be happy to see this commit: http://qt.gitorious.org/qt/qt/commit/511c434b959be96c992e59f4a2748ac251d5c72a. It's on the Qt 4.7 tree. > The QImage speed suggests that drawing performance on OSX could be sensibly > improved by using a better compiler. In Digital Signal Processing, > it is not unusual to see a +100% speed improvement by using the intel > compiler in certain parts, though this is never something systematic. This > compiler is good but very slow to compile. Maybe the Qt drawing primitives > could be isolated and compiled separatly using such compiler... In some very tight loops, we've tried to improve our code by rewriting it in such a way that it optimised better. There are also sections of the code that are written directly in assembly, using MMX, SSE and other such instructions for better performance. I remember one circumstance where one particular section of the code was 3x slower with GCC than with MSVC. So we took the assembler output from MSVC and rewrote the code to be similar to that assembly. GCC then generated that 3x- faster code. -- Thiago Macieira - thiago.macieira (AT) nokia.com Senior Product Manager - Nokia, Qt Development Frameworks Sandakerveien 116, NO-0402 Oslo, Norway
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
