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

Conversation

Projects
None yet
2 participants
@shibatch
Copy link
Owner

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 added some commits Jan 29, 2019

@shibatch shibatch requested review from fpetrogalli-arm and xoofx Jan 29, 2019

shibatch added some commits Jan 29, 2019

@fpetrogalli-arm

This comment has been minimized.

Copy link
Collaborator

fpetrogalli-arm commented Feb 4, 2019

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

@shibatch

This comment has been minimized.

Copy link
Owner Author

shibatch commented Feb 5, 2019

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

@shibatch

This comment has been minimized.

Copy link
Owner Author

shibatch commented Feb 5, 2019

Below is the graphs with aarch64.

aarch64 trig
aarch64 non-trig

Show resolved Hide resolved src/libm/sleefdp.c Outdated

@shibatch shibatch merged commit ca4fd10 into master Feb 12, 2019

6 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/jenkins/branch This commit looks good
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@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
You can’t perform that action at this time.