Force inline mul_wide() and reduce() to get rid of performance regression#166
Merged
Merged
Conversation
…sion They are only used in Scalar[8x32/4x64]::mul() internally, so it will not cause binary bloat.
Codecov Report
@@ Coverage Diff @@
## master #166 +/- ##
==========================================
- Coverage 60.25% 60.14% -0.12%
==========================================
Files 25 25
Lines 3555 3555
==========================================
- Hits 2142 2138 -4
- Misses 1413 1417 +4
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed while checking performance in PR #164 that scalar
mul()became slower. Seems to be caused by the compiler ceasing to inlinemul_wide()andreduce()starting from commit 0586693 on.Adding this makes
Scalar4x64::mul()10% faster, but has no effect onScalar8x32performance on my machine; nevertheless, I inlined these functions there as well for the sake of uniformity (may be important for a 32-bit embedded device). These functions are only used once (inmul()), so it won't degrade compilation.I usually prefer not to add explicit inlining, but 10% is a pretty solid speed-up...