Conversation
6df6004 to
719e5a8
Compare
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware, @orizi, and @TomerStarkware).
crates/cairo-lang-sierra-gas/src/core_libfunc_cost_base.rs line 816 at r1 (raw file):
fn statement_vars_cost<'a, Ops: CostOperations, TokenTypes: Iterator<Item = &'a CostTokenType>>( ops: &Ops, token_types: TokenTypes,
Move precost iter inside this function
SIERRA_UPDATE_PATCH_CHANGE_TAG=No interface changes.
719e5a8 to
4355234
Compare
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware reviewed 1 file, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @ilyalesokhin-starkware and @TomerStarkware).
orizi
left a comment
There was a problem hiding this comment.
@orizi made 1 comment.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @eytan-starkware, @ilyalesokhin-starkware, and @TomerStarkware).
crates/cairo-lang-sierra-gas/src/core_libfunc_cost_base.rs line 816 at r1 (raw file):
Previously, eytan-starkware wrote…
Move precost iter inside this function
Done.
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware and @TomerStarkware).

Summary
Refactored the cost operations in the Sierra gas module to simplify the code and improve performance.
Type of change
Please check one:
Why is this change needed?
A lot of useless map iterations and operations were reduced.
Additional context
The changes to the cost operations simplify the code by:
CostValueTypeinstead of the genericCostTypeOptionvalues for better error handling