ad
ad copied to clipboard
Implement `fast-math` Version of `ReverseDouble` with `+ffi`
- I wonder if it is worth adding a "fast-math" version of
ReverseDouble
that achieves better performance at the expense of not being correct with respect to special IEEE floating-point values. This would be more work, but it would give a better migration story for anyone whose applications' performance might be negatively impacted by these changes.
Originally posted by @RyanGlScott in https://github.com/ekmett/ad/issues/105#issuecomment-1660229399
This is the relevant position in the code for this issue: https://github.com/ekmett/ad/blob/18efa2c04fb72c60507c6a53b714851a8c110bdc/cbits/tape.c#L90-L108
Did including this check create a measurable change in any large examples? I forget if we discussed this before
@julmb has some large ad
-based projects that incur a slight performance penalty because of this, if I understand https://github.com/ekmett/ad/pull/105#issue-1791893479 correctly.
Did including this check create a measurable change in any large examples? I forget if we discussed this before
Yes, in my application this would result in a performance improvement of around 20%.