PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

GapiDraw 3.01 - Lost performance is now back again!!

When we made the move to cross-platform in GapiDraw 3.0 we unfortunately lost some of the performance on the way.. I can now tell you that performance is BACK in GapiDraw 3.01 bigtime!

Here are some fresh benchmark statistics:

Image
Nice! :D
Wow! We could all use the extra performance boost! :) Great work! I just hope you guys can find a way to increase GD's performance on Palm devices too.
We are looking into it.. We still have some work to do however, it's not easy to achieve optimal performance on all platforms using the same set of blitloops. For example, while BltFast128x128 colorkey is much faster on the IPAQ without opacity, it actually is faster when using 50% opacity on a stationary pc. :)

I believe that Palm performance will be adequate for most games. Palm does not have the 20ms flip time as is present on the MediaQ chip Pocket PCs, so having a constant memory bandwidth 2.5x slower than WinCE should make games perform approximately close to the 2210 ipaq... Mikael is right now looking into re-writing some of the loops in assembler so we can find out where the bottleneck is (it could be the MemMove routine that's a dog), and I'll keep you informed how that work is proceeding shortly...
Congrats on getting your performance back.

BTW, are those numbers in your spreadsheet referring to blits from system memory to video memory, or system to system?
Digby: System-to-system only.

Mikael was done porting some of the blit loops into ARM assembler yesterday on the Palm (it was quite simple to just move the ARM assembler we had on the Pocket PC to the Palm).. Unfortunately performance was not better than using memcpy. Digby: Here's an interesting question for you:

(a) Using only one memcpy, our ARM assembler version was slightly faster on small blits.
(b) If the same surface was copied a hundred times, our ARM assembler memcpy was up to 2x slower(!) than Palm MemMove. We use ldmia to copy 8 pixels simultaneously, so it should be quite fast. Very strange... It must be a cache issue somehow...
Hard to say what it is. I'm not familiar with the CPUs in the Palm devices or what sort of cache features they have. Could be cache related (maybe they use pld?), or possibly related to TLB misses. If you have someone there who knows ARM assembly, you can disassemble Palm's routine and see what it's actually doing. Who knows, maybe they disable interrupts or something during memmoves.

It might be worthwhile to have your routine move 2x the number of bytes compared to Palm's 2x the number of memmove calls. That might tell you if it's setup time, or actually something in the inner loop that is making the difference. I'm assuming you're moving to/from DWORD aligned buffers?
Hard to say what it is. I'm not familiar with the CPUs in the Palm devices or what sort of cache features they have.


Actually the Tungsten T3 we are testing on is using a XScale 400Mhz CPU, similar to the one used in our 4150's.

If you have someone there who knows ARM assembly, you can disassemble Palm's routine and see what it's actually doing. Who knows, maybe they disable interrupts or something during memmoves.


Might be something like this..

It might be worthwhile to have your routine move 2x the number of bytes compared to Palm's 2x the number of memmove calls. That might tell you if it's setup time, or actually something in the inner loop that is making the difference. I'm assuming you're moving to/from DWORD aligned buffers?


Yes, we are using DWORD-aligned buffers. Good idea - we'll give it a try...