Rasmus Munk Larsen a3298b22ec Implement vectorized versions of log1p and expm1 in Eigen using Kahan's formulas, and change the scalar implementations to properly handle infinite arguments.
Depending on instruction set, significant speedups are observed for the vectorized path:
log1p wall time is reduced 60-93% (2.5x - 15x speedup)
expm1 wall time is reduced 0-85% (1x - 7x speedup)

The scalar path is slower by 20-30% due to the extra branch needed to handle +infinity correctly.

Full benchmarks measured on Intel(R) Xeon(R) Gold 6154 here: https://bitbucket.org/snippets/rmlarsen/MXBkpM
2019-08-12 13:53:28 -07:00
..
2019-03-14 10:08:12 +01:00
2016-05-18 14:03:03 +02:00
2019-05-31 14:08:34 -07:00
2018-11-23 15:37:09 +01:00
2019-01-15 10:51:03 +01:00
2018-11-23 15:12:06 +01:00