Re: OT : Approximate / fast math libraries ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 1 Sep 2007, Chris Jones wrote:

> > Another poster mentioned that pentiums
> > have hardware instructions for trig functions.
> > If you are using them, there isn't much hope for speed up.
>
> Out of interest, whats needs to be done to use these, some gcc flag ? My

gcc won't use them unless it knows that your version of the cpu has them.
You probably need to add a flag that tells gcc exactly what cpu you have.
You might also need -ffast-math .
If all else fails, there is always inline assembly.

> profiling suggests that atan2(x,y) is taking ~ 50% of some method speed. Yes,
> the methods is already fast, but still is this reasonable if hardware
> instructions are being used. Is there some way I can check to see exactly
> what is used ?

objdump -S  galadriel.elf > galadriel.lss
Will produce an disassembly listing intermixed with source.

> > These formulas will probably not be useful unless
> > you know in advance the ranges of their arguments.
>
> Yes, I considered coding up my own methods along this line, but figured
> getting it correct was not a small amount of effort, and was hoping to find
> some project that had done it for me.

How much precision do you need?  On what? Why?

At least one person wrote a book on implementing the C standard library.
It would probably be a better resource than Numerical Recipes.

-- 
Mike   hennebry@xxxxxxxxxxxxxxxxxxxxx
"Horse guts never lie."  -- Cherek Bear-Shoulders

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux