2008-01-18 19:22:42     slow uclibc sin function

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-01-18 19:22:42     slow uclibc sin function


Message: 49820    I have been running into some very slow execution times using the standard sin and cos function from uclibc.  I am running an applet that I have incorporated into busybox)  I have compiled using -mfast-fp and still have not seen any improvement.


I have noticed libbfdsp but I believe that it does not provide any standard sin function.


My distro is 1 year old but I did not see anything in the later tags that showed me a better way.


Any suggestions?



Doug Bailey







2008-01-18 19:34:31     Re: slow uclibc sin function

Mike Frysinger (UNITED STATES)

Message: 49821    well, it's all being done in double precision which is emulated in software, so any function found in libm is going to be dirt slow on the Blackfin


-mfast-fp only affects the code it compiles, so it'll optimize and code *you* write, but since uClibc wasnt built with it, none of the libm code will be affected




2008-01-18 20:03:30     Re: slow uclibc sin function


Message: 49822    Try:


<code>-ffast-math -mfast-fp</code>




Shows the results that can be expected - but as Mike states - You would need to rebuild the toolchain with these on to see the biggest improvement (which I don't think anyone has tried - If that is something you want to us to investigate - let me know).