[mldsa] Remove stack indirection from all operations.#210
Draft
jadephilipoom wants to merge 4 commits intojadep/mldsa-code-size-improvementsfrom
Draft
[mldsa] Remove stack indirection from all operations.#210jadephilipoom wants to merge 4 commits intojadep/mldsa-code-size-improvementsfrom
jadephilipoom wants to merge 4 commits intojadep/mldsa-code-size-improvementsfrom
Conversation
This allows a little more flexibility with how the random value is sourced; it allows tests to provide a predetermined random value, while runtime binaries could still populate this with 0 or RND. Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
Handling memory directly rather than through a stack abstraction slightly improves performance and saves 324B of IMEM and 192B of DMEM for ML-DSA-87. Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
Saves 204B of IMEM and slightly improves performance. Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
Slightly improves performance (0.04% to 0.08% speedup for keygen) and saves 188B of code size. Signed-off-by: Jade Philipoom <jadep@zerorisc.com>
0ff0ef0 to
cce1ffd
Compare
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.
This PR is on top of #208 and should only be merged once that one is merged.
The first commit is from #206 and can be removed when the base branch changes to
expo/master.Drops the stack abstraction entirely from the ML-DSA implementations. This saves significant code size (checked for ML-DSA-87):
It also makes things a tiny bit faster (but the improvements are just a few instructions; the code size is the main thing).