Incredibly slow MMX? (Developers)
> Now I tried to write a transparent PutSprite routine. Suprisingly it wasn't
> so hard but the result is much slower than normal 386 code. If I draw into
> VRAM it is even cca 80 times slower!!!
>
> In my test routines I measured how many cycles of PutSprite will pass in
> 50x55ms. I switched on and off the CPU_info_mmx variable and used RAM or
> VRAM location:
>
> noMMX into RAM: 8645
> MMX into RAM: 5928
> noMMX into VRAM: 10210
> MMX into VRAM: 152 (!!!)
>
> Hell, do I something fundamentaly wrong?
>
> My computer: AMD K6 Thunderbird 1,33 GHz with GeForce4 MX card
> Measured in FreeDOS and DOS session in Windows98 and results are the
> same.
N.B. I'm no expert, take this with a bucket of salt!
MTRR enabled? Aligned properly? Double buffered?
BTW, Wikipedia calls Thunderbird the improved K7 Athlon, so I can't think of any inherent reason its MMX would be weaker. (Even includes the extended MMX subset of SSE, right?) I assume it uses register renaming, but maybe that's not aggressive enough (since you have a few dependency issues, e.g. using same register as output a few times in a row). Actually it looks like your non-MMX code uses lots of MOV, ADD, and a MUL. That stuff is very basic ALU, so it's probably very very fast (i.e. very common, so heavily optimized in the cpu itself).
Complete thread:
- Incredibly slow MMX? - Laaca, 02.03.2009, 21:15 (Developers)
- Incredibly slow MMX? - Rugxulo, 04.03.2009, 03:01
- Incredibly slow MMX? - Laaca, 04.03.2009, 13:26
- Incredibly slow MMX? - Rugxulo, 04.03.2009, 23:50
- Incredibly slow MMX? - Laaca, 04.03.2009, 13:26
- Incredibly slow MMX? - Japheth, 04.03.2009, 17:55
- Incredibly slow MMX? - Laaca, 08.03.2009, 22:04
- Incredibly slow MMX? - Rugxulo, 09.03.2009, 00:33
- Incredibly slow MMX? - mht, 21.03.2009, 12:57
- Incredibly slow MMX? - Laaca, 08.03.2009, 22:04
- Incredibly slow MMX? - DOS386, 22.03.2009, 06:11
- Incredibly slow MMX? - Rugxulo, 04.03.2009, 03:01