Lennart Augustsson mentioned on his blog that he got substantial performance improvements by conveying to LLVM when external functions (e.g. tanh) were pure. How is this done? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
Hi,> Lennart Augustsson mentioned on his blog that he got substantial performance > improvements by conveying to LLVM when external functions (e.g. tanh) were > pure.first note that tanh is not pure, because the result depends on the current floating point rounding mode. However, if you are willing to sacrifice complete numerical correctness, you can give llvm-gcc the -ffast-math flag and, voila!, tanh becomes pure. Ciao, Duncan.
On Tuesday 17 February 2009 09:46:07 Duncan Sands wrote:> Hi, > > > Lennart Augustsson mentioned on his blog that he got substantial > > performance improvements by conveying to LLVM when external functions > > (e.g. tanh) were pure. > > first note that tanh is not pure, because the result depends on the current > floating point rounding mode.Ugh.> However, if you are willing to sacrifice > complete numerical correctness, you can give llvm-gcc the -ffast-math flag > and, voila!, tanh becomes pure.How do you do the equivalent from the JIT? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e