[Mplayer-users] fastmemcpy benchmark

Arpi arpi at thot.banki.hu
Sun Apr 22 16:07:27 CEST 2001


> Asus P5A, K6-2/500, G200/16MB. Linux 2.4.3.
> # ./fastmem.sh 
> k6 : v2-v1=915325227 = 1826477us  (54.750fps)   82.1MB/s
> mmx: v2-v1=790536059 = 1577468us  (63.393fps)   95.1MB/s
> mga-k6 : v2-v1=3012802007 = 6011851us  (16.634fps)   25.0MB/s
> mga-mmx: v2-v1=3798322327 = 7579307us  (13.194fps)   19.8MB/s
> I had an idea about memory bandwidth of this system sucking big time. But
> *this* bad...??
Do you have MTRR registers set up? Or your cpu don't have MTRR?

> How come the mga-* test is so much worse than the others? Does this indicate
> a bug? (Using the module in latest cvs.)
It can't be a bug...
It's problem with your hardware, especially memory handling or pci/agp bus.
Try to play with pci retries latency ram speed and other funny things.

Results on my cel2-600 at 900 (100Mhz FSB) + 256mb pc133 + G400MAX 32MB SGRAM:

k7 : v2-v1=245852155 = 272549us  (366.907fps)  550.4MB/s
mmx: v2-v1=793730130 = 879916us  (113.647fps)  170.5MB/s
sse: v2-v1=217819673 = 241472us  (414.127fps)  621.2MB/s

With MTRR:
mga-k7 : v2-v1=629577283 = 697937us  (143.279fps)  214.9MB/s
mga-mmx: v2-v1=621490284 = 688971us  (145.144fps)  217.7MB/s
mga-sse: v2-v1=637029882 = 706198us  (141.603fps)  212.4MB/s

Without MTRR:
mga-k7 : v2-v1=2908296867 = 3224067us  (31.017fps)   46.5MB/s
mga-mmx: v2-v1=2840935506 = 3149392us  (31.752fps)   47.6MB/s
mga-sse: v2-v1=1490219411 = 1652023us  (60.532fps)   90.8MB/s

Yes, MTRR speeds up things _A_LOT_ !
But it's interesting that without MTRR SSE helps a lot! (2x speedup)
Btw it's useless, because SSE-capable processores has MTRR too.

After I ran gmgaclock to set up Win98 clock values of the cards:
(With MTRR)
mga-k7 : v2-v1=611904783 = 678345us  (147.418fps)  221.1MB/s
mga-mmx: v2-v1=598804120 = 663821us  (150.643fps)  226.0MB/s
mga-sse: v2-v1=617632672 = 684695us  (146.050fps)  219.1MB/s

So, unfortunately, hardware DOES matter a lot.
You can't workaround shit hardware with cool software.

A'rpi / Astral & ESP-team

mailto:arpi at thot.banki.hu

Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net

More information about the MPlayer-users mailing list