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

Optimize halflife-based EMA's in csp.stats #288

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

svatasoiu
Copy link
Collaborator

the decay multiplier can be pre-computed saving a call to log() [note that log( 2.0 ) is currently resulting in a call to log as it is not constexpr until C++26] and division per update

also prefer x*x vs pow( x, 2 ) to avoid relying on compiler to optimize this

Signed-off-by: Sorin Vatasoiu <Sorin.Vatasoiu@Point72.com>
@svatasoiu svatasoiu merged commit 7b38c87 into main Jun 20, 2024
29 checks passed
@svatasoiu svatasoiu deleted the svatasoiu/optimize-ema branch June 20, 2024 18:05
@timkpaine timkpaine added the type: enhancement Issues and PRs related to improvements to existing features label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Issues and PRs related to improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants