@Exophase: Doing 16bit writes instead of 32bit writes in the screen clear function makes my function take twice as much time (1.6ms).
Wheter 32bit writes will be faster heavily depends on the loop itself though. If you simply write a fixed value and do not do anything else in the loop it will be faster. But when I tried to do 32bit write instead of 16bit ones in my software renderer where there are also some computations for each pixel it got a lot slower than 16bit writes. That was probably because the compiler ran out of registers and loaded and stored values from/to the stack (I looked at the asm). It turns out the compiler is not always that great either because these lrd/str instructions were actually redundant. But even with manuall removing them 32bit writes were a tad slower than 16 bit writes (because of the computations).