Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

starknet: make more methods take mut self #316

Merged
merged 7 commits into from
Oct 17, 2023
Merged

starknet: make more methods take mut self #316

merged 7 commits into from
Oct 17, 2023

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented Oct 11, 2023

I think most methods need to take &mut self to be implemented in sir.

Description

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

@github-actions
Copy link

github-actions bot commented Oct 11, 2023

Benchmarking results

Benchmark for program factorial_100

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
cairo-run --available-gas 18446744073709551615 -s programs/benches/factorial_100.cairo 2.329 ± 0.085 2.200 2.479 2893.69 ± 706.95
echo '[null, 18446744073709551615]' | ./target/release/cairo-native-run programs/benches/factorial_100.cairo factorial_100::factorial_100::main --inputs - 0.001 ± 0.000 0.001 0.004 1.79 ± 0.50
./target/bench-outputs/factorial_100 0.001 ± 0.000 0.001 0.006 1.01 ± 0.35
./target/bench-outputs/factorial_100-march-native 0.001 ± 0.000 0.001 0.005 1.00

Benchmark for program fib_1k

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
cairo-run --available-gas 18446744073709551615 -s programs/benches/fib_1k.cairo 2.356 ± 0.098 2.201 2.497 2799.47 ± 588.00
echo '[null, 18446744073709551615]' | ./target/release/cairo-native-run programs/benches/fib_1k.cairo fib_1k::fib_1k::main --inputs - 0.001 ± 0.000 0.001 0.006 1.66 ± 0.46
./target/bench-outputs/fib_1k 0.001 ± 0.000 0.001 0.006 1.00
./target/bench-outputs/fib_1k-march-native 0.001 ± 0.000 0.001 0.006 1.02 ± 0.30

Benchmark for program map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
cairo-run --available-gas 18446744073709551615 -s programs/benches/map.cairo 2.479 ± 0.066 2.381 2.575 1691.32 ± 228.70
echo '[null, 18446744073709551615]' | ./target/release/cairo-native-run programs/benches/map.cairo map::map::main --inputs - 0.001 ± 0.000 0.001 0.004 1.00
./target/bench-outputs/map 0.076 ± 0.002 0.072 0.081 51.60 ± 7.02
./target/bench-outputs/map-march-native 0.074 ± 0.002 0.071 0.081 50.31 ± 6.88

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2023

Codecov Report

Merging #316 (a132d92) into free_ci_space (56198dd) will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           free_ci_space     #316   +/-   ##
==============================================
  Coverage          71.62%   71.62%           
==============================================
  Files                116      116           
  Lines              20617    20617           
==============================================
  Hits               14767    14767           
  Misses              5850     5850           
Files Coverage Δ
src/starknet.rs 8.49% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@edg-l edg-l changed the title make more methods take mut self starknet: make more methods take mut self Oct 11, 2023
@edg-l edg-l changed the base branch from main to free_ci_space October 16, 2023 11:19
igaray
igaray previously approved these changes Oct 17, 2023
Base automatically changed from free_ci_space to main October 17, 2023 15:19
@edg-l edg-l dismissed igaray’s stale review October 17, 2023 15:19

The base branch was changed.

@edg-l edg-l merged commit 273ce25 into main Oct 17, 2023
6 checks passed
@edg-l edg-l deleted the starknet_mut branch October 17, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants