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: simplify rc bounds tracking #1316

Merged
merged 5 commits into from
Jul 11, 2023
Merged

perf: simplify rc bounds tracking #1316

merged 5 commits into from
Jul 11, 2023

Conversation

Oppen
Copy link
Member

@Oppen Oppen commented Jul 4, 2023

Flamegraphs showed a significant amount of time was consumed by indirection while updating rc limits.
This uses more direct means, as well as leading to simpler and more obvious code.

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.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #1316 (3ff0344) into main (52ada39) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 3ff0344 differs from pull request most recent head 2c0e8a7. Consider uploading reports for the commit 2c0e8a7 to get more accurate results

@@            Coverage Diff             @@
##             main    #1316      +/-   ##
==========================================
- Coverage   97.88%   97.88%   -0.01%     
==========================================
  Files          89       89              
  Lines       35474    35469       -5     
==========================================
- Hits        34724    34719       -5     
  Misses        750      750              
Impacted Files Coverage Δ
vm/src/vm/vm_core.rs 97.79% <100.00%> (-0.01%) ⬇️

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

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 4.254 ± 0.015 4.237 4.280 1.04 ± 0.00
head big_factorial 4.083 ± 0.009 4.073 4.095 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 3.624 ± 0.008 3.613 3.642 1.04 ± 0.00
head big_fibonacci 3.488 ± 0.014 3.473 3.517 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 11.267 ± 0.065 11.226 11.428 1.06 ± 0.01
head blake2s_integration_benchmark 10.616 ± 0.029 10.590 10.675 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.957 ± 0.011 3.946 3.978 1.04 ± 0.00
head compare_arrays_200000 3.799 ± 0.015 3.787 3.835 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.613 ± 0.006 2.606 2.622 1.04 ± 0.00
head dict_integration_benchmark 2.522 ± 0.007 2.514 2.535 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.962 ± 0.006 1.956 1.973 1.04 ± 0.01
head field_arithmetic_get_square_benchmark 1.883 ± 0.008 1.876 1.903 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 10.079 ± 0.037 10.047 10.150 1.06 ± 0.01
head integration_builtins 9.475 ± 0.031 9.454 9.559 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 11.438 ± 0.041 11.399 11.538 1.06 ± 0.01
head keccak_integration_benchmark 10.772 ± 0.058 10.711 10.851 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.979 ± 0.009 3.969 3.994 1.05 ± 0.00
head linear_search 3.796 ± 0.013 3.775 3.817 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.851 ± 0.010 2.838 2.870 1.03 ± 0.00
head math_cmp_and_pow_integration_benchmark 2.761 ± 0.005 2.754 2.768 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.573 ± 0.004 2.567 2.580 1.04 ± 0.00
head math_integration_benchmark 2.480 ± 0.009 2.471 2.496 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.262 ± 0.006 2.254 2.273 1.04 ± 0.00
head memory_integration_benchmark 2.176 ± 0.003 2.172 2.181 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.523 ± 0.005 2.517 2.531 1.04 ± 0.00
head operations_with_data_structures_benchmarks 2.426 ± 0.004 2.420 2.434 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 852.9 ± 1.4 851.1 854.5 1.02 ± 0.00
head pedersen 836.5 ± 1.6 834.4 839.8 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.528 ± 0.005 1.521 1.534 1.01 ± 0.00
head poseidon_integration_benchmark 1.511 ± 0.003 1.506 1.516 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.003 ± 0.005 2.999 3.017 1.03 ± 0.00
head secp_integration_benchmark 2.918 ± 0.005 2.912 2.927 1.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.633 ± 0.003 1.629 1.636 1.11 ± 0.00
head set_integration_benchmark 1.474 ± 0.003 1.471 1.479 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 7.260 ± 0.011 7.251 7.289 1.05 ± 0.00
head uint256_integration_benchmark 6.914 ± 0.019 6.896 6.950 1.00

@Oppen Oppen marked this pull request as ready for review July 4, 2023 22:11
Copy link
Member

@pefontana pefontana left a comment

Choose a reason for hiding this comment

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

Nice one perf master!

@pefontana pefontana enabled auto-merge July 7, 2023 19:18
@pefontana pefontana added this pull request to the merge queue Jul 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 7, 2023
@MegaRedHand MegaRedHand added this pull request to the merge queue Jul 7, 2023
@MegaRedHand MegaRedHand removed this pull request from the merge queue due to a manual request Jul 7, 2023
@MegaRedHand MegaRedHand added this pull request to the merge queue Jul 10, 2023
@MegaRedHand MegaRedHand removed this pull request from the merge queue due to a manual request Jul 10, 2023
@Oppen Oppen enabled auto-merge July 11, 2023 13:59
@Oppen Oppen added this pull request to the merge queue Jul 11, 2023
Merged via the queue into main with commit b7ac1e8 Jul 11, 2023
32 checks passed
@Oppen Oppen deleted the perf/simpler_rc_bounds branch July 11, 2023 20:32
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jul 25, 2023
Co-authored-by: Pedro Fontana <fontana.pedro93@gmail.com>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jul 25, 2023
Co-authored-by: Pedro Fontana <fontana.pedro93@gmail.com>
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