Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIBM] Introduce faster method for evaluating polynomials #239

Merged
merged 12 commits into from Feb 12, 2019
Merged

Conversation

@shibatch
Copy link
Owner

@shibatch shibatch commented Jan 29, 2019

This patch replaces Horner method which was used to evaluate polynomials with Estrin's method( https://en.wikipedia.org/wiki/Estrin%27s_scheme ) that allows more parallel computations with out-of-order execution.
This patch also introducing a new reduction method to tan.
With this patch, mainly computation for double-precision functions becomes faster, and the effect is like a few percent to 20 percent. For example, the ratio between execution time of the following functions before and after applying this patch is shown below.

Sleef_atan2d4_u35 : 1.21
Sleef_powd4_u10 : 1.17
Sleef_sind4_u35 : 1.10
Sleef_tand4_u10 : 1.04
Sleef_tand4_u35 : 1.17

@shibatch shibatch requested review from fpetrogalli and xoofx Jan 29, 2019
@fpetrogalli
Copy link
Collaborator

@fpetrogalli fpetrogalli commented Feb 4, 2019

Nice stuff. Could you please provide a speedup report on both Intel and AArch64?

@shibatch
Copy link
Owner Author

@shibatch shibatch commented Feb 5, 2019

Below is the graphs with x86.
x86 trig
x86 non-trig

@shibatch
Copy link
Owner Author

@shibatch shibatch commented Feb 5, 2019

Below is the graphs with aarch64.

aarch64 trig
aarch64 non-trig

src/libm/sleefdp.c Outdated Show resolved Hide resolved
@shibatch shibatch merged commit ca4fd10 into master Feb 12, 2019
6 checks passed
@shibatch shibatch deleted the replace-horner branch Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants