-ffast-math compiler option

Discussion in 'Software for Windows' started by Armitage, Jan 26, 2006.

  1. Armitage

    Armitage Banned

    Joined:
    Feb 23, 2001
    Messages:
    8,086
    Likes Received:
    0
    Anybody use it? I just turned it on on a whim and picked up about 7% (on repeated runs).

    Among other things, this turns on -funsafe-math-optimizations
    From the man page:

    So the engineer in me is saying Bad Idea, and I'll probably stick with that. But a quick look at the results doesn't show any significant difference and 7% is 7%, right? So I'm wondering if anybody has any better insight into what this option means.

    FWIW, this is GCC 3.3.5, Linux on dual opterons, 64 bit
     
  2. Loading...

    Similar Threads - ffast math compiler Forum Date
    Excel math question Software for Windows Jan 16, 2017
    Would installing Visual Studio on an SSD improve compiling speed noticeably? Software for Windows Aug 22, 2014
    Best Math/chemical equation Typing program Software for Windows Mar 6, 2014
    Weird Excel Math Issue Software for Windows Nov 19, 2012
    know of software to easily type math? Software for Windows Sep 14, 2009

  3. Armitage

    Armitage Banned

    Joined:
    Feb 23, 2001
    Messages:
    8,086
    Likes Received:
    0
    Here's an example of a difference in the results. The value is a range between two objects in Km

    32.6364004527575 With -ffast-math
    32.6364004529829 Without --fast-math

    2.25e-10 Km = 225 nanometers
    Not to bad considering the errors in the models I'm using are at least on the order of meters to 10s of meters.