[AD] malloc for bitmaps alignment?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


At 07:51 AM 20/05/2004 -0500, you wrote:
> i have not suggested aligning
> everything.
> i have suggested aligning the malloc
> of the data for memory bitmaps.

Yes, sorry, I got carried away thinking
of other places where SSE could be used :)

Aligning bitmap data to 16 bytes is
easily done, but would be useless if
you do operations on sub bitmaps. I do
a lot of that, say (in my GUI system)
and almost never touch the master bitmap. Still, it's easily done, and,
since you say you're doing your own
SSE code for bitmaps, my last comment
stands: have you got any measurement
for speed, comparing aligned and non
ailgned speeds, with small and large
bitmaps ?


any hard data about performance gains would be influenced by cache size, cache availability, cpu load, CPU model etc.. the only thing i can go on is the available literature on the web, and the general expectance that aligned is faster than non-aligned.

i see the sub-bitmap alignment is a bit of an issue, but i see no solution for that. as the data is malloced i dont see why mallocing from 16byte boundarys is much of an issue, we are not creating 'dead space' with any of allegro's structures.. any dead space would only be created by the memory manager used by the malloc, which is not our concern.

i see no reason why we should not use 16byte aligned malloc.

aj.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/