I'm currently developing a project with SDL. It basically draws and moves images (surfaces) on the screen.
To move an image without leaving a trail, you must first clear the screen surface, pretty much like glClear(), and I'm currently doing it with a simple for loop iterating over the surface's pixels (also drawing a black box on the surface or memset).
While the previous solutions work fine for small surfaces, they get increasingly slower as the surface grows bigger so i was looking for the fastest way I could clear (zero) a memory block.
Also, a friend pointed out that using SIMD instructions could do the work really fast but the last time I've done ASM was on a 8085, any insight on this could also be useful.