On Wednesday, July 16, 2014 6:57:38 AM UTC-4, Florian Oswald wrote: > > i'm looking for ways to improve the performance of ^ as in f(x) = x^1.4 >
A non-integer power like this is already calling the math-library `pow` function (assuming `x` is real). I've found that it is often faster to call exp(1.4 * log(x)) rather than x^1.4 (maybe the latter has to check for more corner cases, e.g. for zero powers?) You could try to get a faster math library (e.g. maybe icc's? some benchmarking would be required). You could try to rearrange your algorithm to reduce the number of non-integer powers that need to be computed (e.g. by grouping terms). The other thing you could do is to trade off accuracy for speed. Especially for a limited range of x, there are various approximations that you could use that are probably faster than exp or pow.
