Conversation
5 tasks
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5 tasks
42f5d05 to
e04df7d
Compare
SIERRA_UPDATE_PATCH_CHANGE_TAG=No interface change.
e04df7d to
f8e8e40
Compare
c9e404d to
00a0d97
Compare
eytan-starkware
approved these changes
Jan 28, 2026
Contributor
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @orizi).
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
Refactored the
combinemethod inGasInfoto use more efficient entry-based operations instead of creating new collections. The new implementation directly updates the existingvariable_valuesandfunction_costsmaps by iterating through the entries of the otherGasInfoinstance and adding values to the corresponding entries or inserting new ones when needed.Type of change
Please check one:
Why is this change needed?
The previous implementation of
combinewas inefficient as it created new collections by first collecting unique keys from both maps, then creating new entries with combined values. This approach involved unnecessary allocations and computations. The new implementation directly updates the existing maps, reducing memory allocations and improving performance.What was the behavior or documentation before?
The previous implementation created new collections by collecting unique keys, swapping out values, and building new maps from scratch, which was less efficient.
What is the behavior or documentation after?
The new implementation maintains the same functionality but uses the
EntryAPI to directly update the existing maps in-place, reducing allocations and improving performance. It also adds a descriptive comment about the method's purpose.Additional context
This change is part of ongoing performance optimizations in the Sierra gas calculation system. The functionality remains identical, but the implementation is more efficient.