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

capacity-limiter-api: avoid division in EMA #3030

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

bryce-anderson
Copy link
Contributor

Motivation:

Division is much more expensive than multiplication, certainly when the compliler doesn't know the denominator and can do tricks to mitigate.

Modifications:

In the capacity limiter EMA we have a division operation where the denominator is always the same which is a good candidate for inverting once and turning into a multiplication operation.

Motivation:

Division is much more expensive than multiplication, certainly when
the compliler doesn't know the denominator and can do tricks to mitigate.

Modifications:

In the capacity limiter EMA we have a division operation where the
denominator is always the same which is a good candidate for inverting
once and turning into a multiplication operation.
@bryce-anderson bryce-anderson merged commit 893a156 into apple:main Aug 5, 2024
11 checks passed
@bryce-anderson bryce-anderson deleted the bl_anderson/invTau branch August 5, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants