SDL very slow (benchmark)

Fernando fcarello at libero.it
Fri May 14 18:13:16 EDT 2010


So, here we are; I prepared a simple SDL benchmark for the Ben.

By the way: how can I share some files with the list? I don't have a working 
online repository at the moment.

Well, let's throw some numbers. I used a 1280x1024 at 24bpp JPG (file size about 
1 MB). 

Times in milliseconds, video depth = 16 bpp, average:

 SDL_init = 482
 SDL_Image_imgLoad = 3300 (!!!)
 SDL_SetVideoMode = 28
 SDL_gfx_zoomSurface (smooth) = 962
 SDL_FillRect = 6.9
 SDL_BlitSurface = 75
 SDL_Flip = 42
 SDL_FreeSurface = 0.7

Times in milliseconds, video depth = 32 bpp, average:

 SDL_init = 482
 SDL_Image_imgLoad = 3300 (!!!)
 SDL_SetVideoMode = 28
 SDL_gfx_zoomSurface (smooth) = 962
 SDL_FillRect = 13
 SDL_BlitSurface = 74
 SDL_Flip = 19
 SDL_FreeSurface = 0.75

So, we have a very slooooow image load time (that's 300 KB/s, and this is from 
internal storage, not from card), a very slow zoomSurface (OK, this is 
understandable because of no hardware floating point) and a quite slow (Fill + 
Blit + Flip), totalling more than 1/10s (this means a 10 FPS hard cap for 
screen updating alone!).
Probably SDL is implemented in pure software mode, without any help from 
4740's special instructions or graphic chip (if it even exists on the SoC...?).
Even then, a 366 MHz should be capable of something better, I would guess...?
Does anybody know if there are some kernel optimizations in the work queue?

Fernando

PS: please let me know if I can submit binary file + source code + makefile 
somewhere. I'm not accustomed with git and software management systems in 
general. :-)


>Actually I just observed a slow execution of these functions (no individual 
timing):
>
>SDL_FillRect()	
>SDL_BlitSurface()
>SDL_Flip()
>
>which I call consecutively; and an extremely slow (we are talking about some 
seconds for a 1024x768 image) execution of
>
>zoomSurface() 
>
>(from SDL_gfx)
>
>but you raise an interesting point: I should really write a real benchmark, 
with appropriate granularity to isolate the various SDL functions.
>I'll do that and report back. 
>
>Fernando
>
>
>
>
>------------------------------
>
>_______________________________________________
>discussion mailing list
>discussion at lists.qi-hardware.com
>http://en.qi-hardware.com/mailman/listinfo/discussion
>
>End of discussion Digest, Vol 4, Issue 19
>*****************************************
>






More information about the discussion mailing list


interactive