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

perf!: move identifiers to SharedProgramData #1023

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

Oppen
Copy link
Member

@Oppen Oppen commented Apr 20, 2023

Part of the same effort to reduce CairoRunner creation time. Breaks due to that field being public.

Checklist

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

@github-actions
Copy link

github-actions bot commented Apr 20, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 2.504 ± 0.040 2.466 2.590 1.00
head blake2s_integration_benchmark 2.511 ± 0.046 2.487 2.638 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.111 ± 0.033 3.057 3.169 1.01 ± 0.01
head compare_arrays_200000 3.078 ± 0.020 3.061 3.127 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.435 ± 0.012 2.410 2.454 1.00
head dict_integration_benchmark 2.438 ± 0.023 2.409 2.486 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 3.729 ± 0.015 3.706 3.758 1.00
head factorial_multirun 3.801 ± 0.035 3.757 3.874 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 2.998 ± 0.024 2.963 3.043 1.00
head fibonacci_1000_multirun 3.036 ± 0.009 3.023 3.051 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 129.3 ± 1.0 127.8 130.5 1.01 ± 0.01
head field_arithmetic_get_square_benchmark 128.5 ± 1.3 126.6 130.8 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 3.064 ± 0.017 3.042 3.092 1.00
head integration_builtins 3.110 ± 0.037 3.062 3.178 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 2.663 ± 0.011 2.648 2.683 1.00
head keccak_integration_benchmark 2.685 ± 0.014 2.665 2.710 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.177 ± 0.014 3.151 3.202 1.00 ± 0.01
head linear_search 3.175 ± 0.016 3.155 3.205 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.715 ± 0.011 2.700 2.736 1.00
head math_cmp_and_pow_integration_benchmark 2.740 ± 0.027 2.711 2.796 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.538 ± 0.056 2.508 2.693 1.00
head math_integration_benchmark 2.545 ± 0.020 2.523 2.583 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.157 ± 0.019 2.138 2.198 1.00 ± 0.01
head memory_integration_benchmark 2.152 ± 0.019 2.132 2.189 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.254 ± 0.009 2.244 2.273 1.00 ± 0.01
head operations_with_data_structures_benchmarks 2.248 ± 0.025 2.231 2.317 1.00
Command Mean [s] Min [s] Max [s] Relative
base pedersen 3.297 ± 0.060 3.223 3.402 1.03 ± 0.02
head pedersen 3.203 ± 0.006 3.196 3.214 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.507 ± 0.005 1.497 1.516 1.00 ± 0.00
head poseidon_integration_benchmark 1.506 ± 0.006 1.498 1.515 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.358 ± 0.008 2.342 2.372 1.00
head secp_integration_benchmark 2.374 ± 0.012 2.357 2.391 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.698 ± 0.013 1.684 1.719 1.01 ± 0.01
head set_integration_benchmark 1.685 ± 0.006 1.678 1.698 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.936 ± 0.015 3.918 3.969 1.00
head uint256_integration_benchmark 3.945 ± 0.047 3.913 4.074 1.00 ± 0.01

@Oppen Oppen marked this pull request as ready for review April 20, 2023 16:00
@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #1023 (44bca19) into main (a178759) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1023   +/-   ##
=======================================
  Coverage   98.06%   98.07%           
=======================================
  Files          78       78           
  Lines       32376    32448   +72     
=======================================
+ Hits        31751    31823   +72     
  Misses        625      625           
Impacted Files Coverage Δ
src/serde/deserialize_program.rs 97.48% <100.00%> (-0.01%) ⬇️
src/types/program.rs 99.36% <100.00%> (+0.07%) ⬆️
src/utils.rs 99.43% <100.00%> (ø)
src/vm/runners/cairo_runner.rs 98.08% <100.00%> (+<0.01%) ⬆️

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

Copy link
Contributor

@MegaRedHand MegaRedHand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Oppen Oppen enabled auto-merge April 20, 2023 19:10
@Oppen Oppen disabled auto-merge April 20, 2023 19:22
@Oppen Oppen force-pushed the perf/share_program_identifiers branch 2 times, most recently from c48b8d1 to 0633b8f Compare April 20, 2023 19:27
@Oppen Oppen enabled auto-merge April 20, 2023 19:28
Copy link
Member

@juanbono juanbono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a identifiers getter

@Oppen Oppen force-pushed the perf/share_program_identifiers branch from 0633b8f to 68da475 Compare April 20, 2023 19:56
@Oppen Oppen disabled auto-merge April 20, 2023 19:56
@Oppen Oppen force-pushed the perf/share_program_identifiers branch from 68da475 to 50fa492 Compare April 20, 2023 19:58
@Oppen Oppen enabled auto-merge April 20, 2023 20:01
Part of the same effort to reduce `CairoRunner` creation time.
Breaks due to that field being public.
To reduce future breakage, we make all remaining fields `pub(crate)`.
@Oppen Oppen force-pushed the perf/share_program_identifiers branch from ee0f829 to 401d690 Compare April 20, 2023 20:46
@Oppen Oppen added this pull request to the merge queue Apr 20, 2023
Merged via the queue into main with commit 6ca401a Apr 20, 2023
15 checks passed
@Oppen Oppen deleted the perf/share_program_identifiers branch April 20, 2023 22:05
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
Part of the same effort to reduce `CairoRunner` creation time.
Breaks due to that field being public.
To reduce future breakage, we make all remaining fields `pub(crate)`.
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.

None yet

3 participants