GernotFrisch
Member
- Joined
- Jan 2, 2007
- Messages
- 445
Alex. said:Contiguous reads doubled the speed, terrific And Notaz's mmuhack is brilliant, I get an extra 30 fps in 320x240 mode, and 8 fps in 240x320.
But now tear runs at 170 fps, and no-tear runs at 88. I tried removing the inner loop and use macros like KungPhoo, but that actually makes it a little slower.
Code:Uint16* dst = (Uint16*)a_screen->pixels + WIDTH * HEIGHT; const Uint16* src = a_pixels; for(int i = HEIGHT; i--; dst += WIDTH * HEIGHT + 1) { for(int j = WIDTH; j--; ) { dst -= HEIGHT; *dst = *src++; } }
Would be interested in why the loop might be faster than the manual unroll. Can someone check the ASM produced?
Last edited by a moderator: