Re: [AD] ALLEGRO_USE_C vs ALLEGRO_NO_ASM

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


Milan Mimica wrote:

As for ASM vs. C, assembly optimized version of clear_to_color() is
 faster than its C counterpart, on the other hand C-implementation
of RLE sprites is faster than ASM.

I wonder if it is possible to easily exclude ASM in some functions
and leave it in the others.

It's probably possible, though it is not so easy. One of the reasons of
ABI incompatibility is a nonstandard calling convention (correct me if I
am wrong). If we benchmark the code, figure out which functions really
work good, they could be converted into gcc inline assembly blocks in
*.c sources. So calling conventions will remain compatible with pure
C-version of the library, but the functions which can get performance
improvement from assembly will work faster.

You can check SDL sources to see how it works, also a good example of
using assembly optimizations is http://scale2x.sourceforge.net






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