This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Speed up floating point math

I know that Keil has spent lots of time optimizing the floating point routine, but we are hitting a performance wall in our application and we are looking for anything that will keep us in the current platform.
My question has to do with trying to shave time off of a square root operation. We would be content with 4 decimal places of precision for our calculations, so is there any way to get that operation to cut short and just return the lower precision that we need.?

Parents
  • The standard library provides only one version of sqrt. It should be optimized for general case.
    If you can put up with less precision or use a simpler format for the result (say, fixed point,) then you can accelerate the calculation. The way to do that is to write your own routine for that in assembly language. Use your favourite search engine to find implementations of square root, like this one:
    http://www.azillionmonkeys.com/qed/sqroot.html
    Best luck!
    - Mike

Reply
  • The standard library provides only one version of sqrt. It should be optimized for general case.
    If you can put up with less precision or use a simpler format for the result (say, fixed point,) then you can accelerate the calculation. The way to do that is to write your own routine for that in assembly language. Use your favourite search engine to find implementations of square root, like this one:
    http://www.azillionmonkeys.com/qed/sqroot.html
    Best luck!
    - Mike

Children
No data