News for hackers. Stuff that matters.
Re:Fast Approximate Logarithms, Part III: The Formulas by eutectate on Saturday June 27, 2015 @01:15PM (#9790794)
Using Horner's method to evaluate the polynomials is probably suboptimal because it introduces dependencies and eliminates instruction-level parallelism. It might be worth trying Estrin's method instead (if the compiler does not rewrite them already).
Re:Fast Approximate Logarithms, Part III: The Formulas by brandmeyer on Saturday June 27, 2015 @08:56PM (#9792027)
Actually, there is quite a bit of available ILP in the forms that use division - as high as four insns. The numerator and denominator can be evaluated in parallel, and the coefficient loads can be interleaved with the FMAs to hide some of their latency.

That said, with such a low variation in the timings I wonder if some other overhead was dominating the costs. For example, floating-point division is typically much slower than either addition or multiplication. According to Agner Fog, div is 2-4x slower in latency than add and mul while completely hogging the pipeline.

Re:Fast Approximate Logarithms, Part III: The Formulas by jason_s on Sunday July 05, 2015 @09:57PM (#9836205)
interesting -- never heard of Estrin's method; thanks!