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

Fix Uint256 unsigned div rem Hints #1203

Merged
merged 8 commits into from
Jun 5, 2023

Conversation

pefontana
Copy link
Collaborator

Fix Uint256 unsigned div rem Hints

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.

@pefontana pefontana marked this pull request as ready for review June 5, 2023 21:18
Copy link
Contributor

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 13.024 ± 0.126 12.859 13.269 1.00 ± 0.01
head blake2s_integration_benchmark 12.975 ± 0.124 12.860 13.231 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 4.138 ± 0.059 4.070 4.256 1.00 ± 0.02
head compare_arrays_200000 4.135 ± 0.032 4.104 4.203 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.694 ± 0.016 2.679 2.722 1.00
head dict_integration_benchmark 2.701 ± 0.021 2.677 2.743 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 4.356 ± 0.053 4.303 4.481 1.01 ± 0.01
head factorial_multirun 4.331 ± 0.032 4.293 4.395 1.00
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.816 ± 0.028 3.791 3.872 1.00 ± 0.01
head fibonacci_1000_multirun 3.809 ± 0.022 3.778 3.862 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 185.7 ± 4.1 182.1 193.2 1.02 ± 0.02
head field_arithmetic_get_square_benchmark 181.9 ± 0.9 179.9 182.8 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 12.069 ± 0.156 11.921 12.420 1.00
head integration_builtins 12.073 ± 0.149 11.916 12.429 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 13.582 ± 0.431 13.048 14.503 1.03 ± 0.04
head keccak_integration_benchmark 13.127 ± 0.202 12.930 13.537 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 4.175 ± 0.072 4.098 4.325 1.01 ± 0.02
head linear_search 4.152 ± 0.066 4.095 4.267 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.864 ± 0.018 2.845 2.905 1.00
head math_cmp_and_pow_integration_benchmark 2.866 ± 0.016 2.843 2.886 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.695 ± 0.021 2.667 2.742 1.01 ± 0.01
head math_integration_benchmark 2.680 ± 0.020 2.661 2.727 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.326 ± 0.011 2.312 2.349 1.00
head memory_integration_benchmark 2.339 ± 0.020 2.320 2.390 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.660 ± 0.040 2.633 2.763 1.00 ± 0.02
head operations_with_data_structures_benchmarks 2.648 ± 0.017 2.628 2.683 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 907.6 ± 3.6 903.3 913.9 1.00 ± 0.01
head pedersen 906.5 ± 9.3 901.0 932.4 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.646 ± 0.016 1.629 1.689 1.00
head poseidon_integration_benchmark 1.649 ± 0.008 1.639 1.661 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.211 ± 0.015 3.187 3.228 1.00
head secp_integration_benchmark 3.220 ± 0.030 3.188 3.277 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.491 ± 0.009 1.479 1.510 1.00 ± 0.01
head set_integration_benchmark 1.490 ± 0.013 1.476 1.520 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 8.271 ± 0.273 8.114 8.990 1.01 ± 0.03
head uint256_integration_benchmark 8.195 ± 0.076 8.117 8.372 1.00

@pefontana pefontana enabled auto-merge June 5, 2023 22:32
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Merging #1203 (4bbfbfe) into main (fc09e20) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1203   +/-   ##
=======================================
  Coverage   97.59%   97.59%           
=======================================
  Files          89       89           
  Lines       36089    36089           
=======================================
  Hits        35220    35220           
  Misses        869      869           
Impacted Files Coverage Δ
..._processor/builtin_hint_processor/uint256_utils.rs 99.57% <100.00%> (ø)

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

@pefontana pefontana added this pull request to the merge queue Jun 5, 2023
Merged via the queue into main with commit ae87c31 Jun 5, 2023
@pefontana pefontana deleted the fix-uint256_offseted_unsigned_div_rem branch June 5, 2023 23:31
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Fix bug

* Fix U256 inserts

* Add integration test

* Remove dbg

* Update CHANGELOG.md

* Add UINT256_EXPANDED_UNSIGNED_DIV_REM test

* Fix memeory holes
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.

4 participants