Conversation
This was referenced Jan 13, 2026
5 tasks
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jan 13, 2026
Closed
5bdde35 to
c943c75
Compare
ef87631 to
4686472
Compare
TomerStarkware
approved these changes
Jan 14, 2026
Collaborator
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware).
…ostly. SIERRA_UPDATE_PATCH_CHANGE_TAG=No external changes.
4686472 to
42b8264
Compare
c943c75 to
3b7a44e
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.

Summary
Optimized the
decompressfunction in the Starknet classes crate by replacing BigUint division with a more efficient no-allocation implementation using fixed-size arrays and u64/u128 operations. This change improves performance by avoiding heap allocations during the decompression process.Type of change
Please check one:
Why is this change needed?
The previous implementation of the
decompressfunction used BigUint division operations which require heap allocations. This is inefficient for this particular use case since we're working with felt252 values that can be represented with a fixed number of u64 limbs.What was the behavior or documentation before?
The code used BigUint division and modulo operations which allocate memory on the heap for intermediate results during decompression.
What is the behavior or documentation after?
The new implementation uses a fixed-size array of u64 values and performs division using u128 operations without any heap allocations, making the decompression process more efficient.
Additional context
Since all values are felt252s, we can safely assume that 4 u64 limbs are sufficient for the representation, allowing us to use a more efficient division algorithm with fixed-size arrays.