-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Introduce faster approximate sinh/atan math functions #49009
Conversation
This commit introduces a new class called ESSloppyMath that is meant to reflect the purpose of Lucene's SloppyMath, but add additional unimplemented faster alternatives to math functions. The two that are used by geotile-grid a lot are sinh/atan. In a quick elasticsearch rally benchmark for geotile-grid on Switzerland data points, this shows a (1.22x) 22% speed-up over using Math's functions. closes elastic#41166.
Pinging @elastic/es-analytics-geo (:Analytics/Geo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I wonder if we should port as well the function for exp
and expm1
but that can be done in a follow up PR.
thanks Ignacio. I wondered the same about |
Sounds like a good plan to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM2. Except I am not 100% about the header treatment here.
@elasticmachine update branch |
This commit introduces a new class called ESSloppyMath that is meant to reflect the purpose of Lucene's SloppyMath, but add additional unimplemented faster alternatives to math functions. The two that are used by geotile-grid a lot are sinh/atan. In a quick elasticsearch rally benchmark for geotile-grid on Switzerland data points, this shows a (1.22x) 22% speed-up over using Math's functions. closes #41166.
this resolves incorrectly licensed code in elastic#49009. ESSloppyMath is removed in favor of preserving as much of the original FastMath as possible. Since no additional methods are introduced in ESSloppyMath, this abstraction is removed.
this resolves incorrectly licensed code in #49009. ESSloppyMath is made as a wrapper around FastMath.java which is not meant to be modified with code beyond the original source
This commit introduces a new class called ESSloppyMath
that is meant to reflect the purpose of Lucene's SloppyMath,
but add additional unimplemented faster alternatives to math functions.
The two that are used by geotile-grid a lot are sinh/atan. This commit also
switches that implementation to use these new functions.
In a quick elasticsearch rally benchmark for geotile-grid on Switzerland
data points, this shows a (1.22x) 22% speed-up over using Math's functions.
closes #41166.