On Fri, Feb 1, 2013 at 9:28 AM, Albert Cahalan <[email protected]> wrote:

> >> I think the problem is that gcc is trying too hard. It's probably giving
>  >> you 100% IEEE-compliant floating-point using the standard format.
> >>
> >> The first thing to do is to say that all NaN and Inf values...
>
> > I already tried the ”-mfast-fp” option which does at least some of those
> > things.
>
> I should have said gcc's floating-point **library** is trying too hard.
> All the compiler options in the world won't change the library's
> algorithms.
>

The -mfast-fp option makes it link with a different library [1] which uses
assembly routines optimized for Blackfin instead of the ones provided by
libgcc [2].  It "relaxes some rules in IEEE floating-point standard of
checking NaN for better performance."  I don't know what it does with Inf.

> I hadn't really considered that.  I suppose the cleanest way to accomplish
> > it would be to add proper support for the "half float" datatype
>
> No, a short float won't help you. (well, not much: maybe cache misses
> and it might mean a tad if you don't have 32-bit registers)
>

Except when using the "DSP" instructions that use the MAC registers, the
Blackfin is a 16-bit processor.  So I would expect 32-bit addition and
subtraction to be around half as fast as 16-bit, and multiplication and
division to be slower yet.  So I think a 16-bit float library would help a
lot on that processor.  On the other hand, 32-bit processors may not
benefit at all.  Thus the reason I was trying to use typedefs to make it
easy to swap out.

Thanks for the ideas.

Steve


[1] - http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01509.html
[2] -
https://docs.blackfin.uclinux.org/doku.php?id=optimization&s[]=mfast&s[]=fp


-- 
Steve Strobel
Link Communications, Inc.
1035 Cerise Rd
Billings, MT 59101-7378
(406) 245-5002 ext 102
(406) 245-4889 (fax)
WWW: http://www.link-comm.com
MailTo:[email protected]
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to