Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I get a performance bonus if I try to use arm math assembler commands instead of c

I have cycle in my application in which executed mathematical multiply and addition calculations.

I know some facts:

  • android devices supports armv6 and up processors
  • armv6 not supported NEON commands

Does i increase performance of application on armv6 including, and up, if instead of c math commands i will start using assembler math commands?

UPDATE

i need to execute cycle with math operation faster, is right way to use assembler instead of c.

UPDATE

i have this calculation:

Ry0 = (b0a0 * buffer[index] + b1a0 * Rx1 + b2a0 * Rx2 - a1a0 * Ry1
                    - a2a0 * Ry2);

it is biquad transfer function.

Can i force execute this calculation faster with asm?

UPDATE

  • buffer size is 192000
  • variables is float type
like image 558
testCoder Avatar asked Nov 28 '22 08:11

testCoder


1 Answers

Compilers are pretty good at their job, so unless you KNOW what your compiler is producing, and know that you can do better, probably not.

Without knowing exactly what your code does, it would be impossible to give a better answer.

Edit: to summarize this discussion: The FIRST step in improving performance is not to start writing assembler. The first step is to find the most efficient algorithm. Once that has been done you can look at assembler coding.

like image 78
Mats Petersson Avatar answered Dec 05 '22 07:12

Mats Petersson