[SDL] Blit1to2 optimization
Gianni Trevisti
g.trevisti at gmail.com
Thu Dec 28 02:04:37 PST 2006
> It'd be if extra mem eaten is good or not. I know on my PDA, I'd be annoyed
at sizeof(int) * 64K being eaten up :) (given that lookup_map isn't typed, it'd
default to an int).Generally, what you should probably do is convert your
surface to the native screen type. This way it doesn't have to convert on every
blit.
> -Will
Hello,
for sure it's better to work using the native screen type. Unfortunately the
game I'm working on comes from Amiga, and there is a lot of code written with 8
bit/pixel in mind, so it is an hard work :-)
On a PDA (at least one of the current generation) you're right.
But on a Set Top Box or an old PC (a machine with some mega of memory, I mean)
it can be useful. Consider that the current version perform 105% more read to
instruction code and 100% more to data (stat coming from cachegrind).
So if you've to perform this operation a lot of times and you've 256 KB of spare
memory, isn't good to save so much CPU?
Gianni
More information about the SDL
mailing list