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

Check as_int usage in hints #1191

Merged
merged 10 commits into from
Jun 1, 2023
Merged

Check as_int usage in hints #1191

merged 10 commits into from
Jun 1, 2023

Conversation

fmoletta
Copy link
Member

TITLE

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.
    • CHANGELOG has been updated.

@fmoletta fmoletta marked this pull request as ready for review May 30, 2023 15:45
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #1191 (b6a75ee) into main (5db2e65) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1191   +/-   ##
=======================================
  Coverage   97.69%   97.69%           
=======================================
  Files          89       89           
  Lines       35972    35975    +3     
=======================================
+ Hits        35144    35147    +3     
  Misses        828      828           
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor/math_utils.rs 98.02% <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 May 30, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 12.556 ± 0.068 12.483 12.711 1.01 ± 0.01
head blake2s_integration_benchmark 12.442 ± 0.154 12.352 12.875 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 4.190 ± 0.021 4.157 4.212 1.00 ± 0.01
head compare_arrays_200000 4.179 ± 0.038 4.147 4.252 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.775 ± 0.013 2.763 2.797 1.00 ± 0.01
head dict_integration_benchmark 2.773 ± 0.019 2.758 2.823 1.00
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 4.389 ± 0.018 4.367 4.425 1.00
head factorial_multirun 4.395 ± 0.016 4.374 4.429 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.803 ± 0.021 3.774 3.843 1.00 ± 0.01
head fibonacci_1000_multirun 3.793 ± 0.032 3.766 3.856 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 180.1 ± 0.5 179.4 180.9 1.00
head field_arithmetic_get_square_benchmark 180.4 ± 2.5 178.2 186.3 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 11.516 ± 0.314 11.239 12.296 1.01 ± 0.03
head integration_builtins 11.350 ± 0.056 11.285 11.485 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 12.865 ± 0.153 12.674 13.089 1.00 ± 0.02
head keccak_integration_benchmark 12.814 ± 0.234 12.514 13.337 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 4.179 ± 0.023 4.155 4.225 1.00 ± 0.01
head linear_search 4.167 ± 0.015 4.135 4.190 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 3.044 ± 0.032 3.015 3.116 1.00 ± 0.01
head math_cmp_and_pow_integration_benchmark 3.033 ± 0.012 3.019 3.060 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.809 ± 0.018 2.795 2.858 1.00 ± 0.01
head math_integration_benchmark 2.807 ± 0.020 2.794 2.862 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.392 ± 0.008 2.385 2.413 1.00
head memory_integration_benchmark 2.393 ± 0.015 2.375 2.428 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.778 ± 0.040 2.761 2.891 1.00 ± 0.02
head operations_with_data_structures_benchmarks 2.774 ± 0.022 2.758 2.834 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 897.1 ± 4.0 894.4 908.0 1.00
head pedersen 899.9 ± 7.3 893.2 917.6 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.608 ± 0.013 1.601 1.642 1.01 ± 0.01
head poseidon_integration_benchmark 1.594 ± 0.005 1.588 1.604 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.424 ± 0.007 3.412 3.433 1.00
head secp_integration_benchmark 3.428 ± 0.028 3.397 3.492 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.899 ± 0.011 1.891 1.927 1.00
head set_integration_benchmark 1.902 ± 0.035 1.886 2.001 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 8.183 ± 0.103 8.135 8.475 1.01 ± 0.01
head uint256_integration_benchmark 8.119 ± 0.016 8.091 8.150 1.00

CHANGELOG.md Outdated Show resolved Hide resolved
@fmoletta fmoletta added this pull request to the merge queue Jun 1, 2023
Merged via the queue into main with commit d9784bf Jun 1, 2023
31 checks passed
@fmoletta fmoletta deleted the check-as-int branch June 1, 2023 14:28
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Add `as_int` logic to `assert_250_bit` hint

* Remove uneeded to_signed_felt in `SIGNED_DIV_REM` hint

* Add changelog entry

* Clippy

* Update CHANGELOG.md

Co-authored-by: Tomás <47506558+MegaRedHand@users.noreply.github.com>

---------

Co-authored-by: Juan Bono <juanbono94@gmail.com>
Co-authored-by: Tomás <47506558+MegaRedHand@users.noreply.github.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.

Check as_int calls using to_bigint instead of to_signed_felt in hint implementationss
4 participants