Original Post
I have a texture for a raycaster of the form std::vector texture; and fill it with 64x64 pixels. I use it to draw some stuff and it goes at 15 fps. Then I use a static array instead for the texture: Uint32 texture[64][64]; I draw the stuff again, and now it goes at 20 fps! What makes std::vectors slower? I assume the data itself doesn't take up more space and can be cached just as good, or doesn't it?