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

feat(hints): Implement NewHint#46 #1055

Merged
merged 12 commits into from
Apr 28, 2023
Merged

feat(hints): Implement NewHint#46 #1055

merged 12 commits into from
Apr 28, 2023

Conversation

fmoletta
Copy link
Contributor

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.

@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Merging #1055 (f345b47) into main (d41c959) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1055   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files          84       84           
  Lines       34205    34231   +26     
=======================================
+ Hits        33559    33585   +26     
  Misses        646      646           
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor_definition.rs 99.04% <100.00%> (+<0.01%) ⬆️
...int_processor/builtin_hint_processor/math_utils.rs 98.06% <100.00%> (+0.02%) ⬆️

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

@Oppen Oppen added the whitelisted-hint Implementation of hint on whitelist directory label Apr 25, 2023
@fmoletta fmoletta marked this pull request as ready for review April 26, 2023 16:54
@github-actions
Copy link

github-actions bot commented Apr 26, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 2.920 ± 0.028 2.893 2.972 1.00 ± 0.01
head blake2s_integration_benchmark 2.911 ± 0.033 2.874 2.986 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.507 ± 0.027 3.470 3.564 1.00 ± 0.02
head compare_arrays_200000 3.494 ± 0.054 3.449 3.639 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.624 ± 0.023 2.594 2.656 1.00
head dict_integration_benchmark 2.644 ± 0.092 2.600 2.902 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 4.216 ± 0.028 4.192 4.288 1.00 ± 0.01
head factorial_multirun 4.199 ± 0.023 4.176 4.241 1.00
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.387 ± 0.020 3.365 3.433 1.00
head fibonacci_1000_multirun 3.406 ± 0.022 3.385 3.460 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 134.4 ± 1.4 131.6 136.0 1.00 ± 0.01
head field_arithmetic_get_square_benchmark 133.8 ± 0.6 132.9 135.1 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 3.370 ± 0.020 3.349 3.398 1.01 ± 0.01
head integration_builtins 3.336 ± 0.008 3.325 3.355 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 3.193 ± 0.020 3.168 3.225 1.00
head keccak_integration_benchmark 3.201 ± 0.030 3.180 3.271 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.634 ± 0.032 3.609 3.714 1.00
head linear_search 3.645 ± 0.053 3.586 3.764 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 3.045 ± 0.033 3.024 3.133 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 3.010 ± 0.019 2.986 3.055 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.734 ± 0.017 2.701 2.760 1.00
head math_integration_benchmark 2.737 ± 0.034 2.707 2.814 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.418 ± 0.015 2.402 2.457 1.00 ± 0.01
head memory_integration_benchmark 2.410 ± 0.027 2.379 2.475 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.431 ± 0.011 2.415 2.449 1.01 ± 0.01
head operations_with_data_structures_benchmarks 2.418 ± 0.010 2.405 2.437 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 815.4 ± 9.8 806.1 837.5 1.01 ± 0.01
head pedersen 804.6 ± 2.4 800.4 807.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.536 ± 0.008 1.527 1.555 1.00
head poseidon_integration_benchmark 1.543 ± 0.007 1.533 1.555 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.702 ± 0.012 2.679 2.723 1.00
head secp_integration_benchmark 2.708 ± 0.007 2.695 2.723 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.904 ± 0.006 1.896 1.918 1.00
head set_integration_benchmark 1.909 ± 0.003 1.903 1.913 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.251 ± 0.018 4.222 4.282 1.01 ± 0.00
head uint256_integration_benchmark 4.210 ± 0.010 4.191 4.221 1.00

Copy link
Collaborator

@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 @fmoletta !
Please, can you add some unit tests?

@fmoletta
Copy link
Contributor Author

Nice one @fmoletta !
Please, can you add some unit tests?

All paths are now covered by the integration test

@pefontana pefontana enabled auto-merge April 28, 2023 15:19
@pefontana pefontana added this pull request to the merge queue Apr 28, 2023
Merged via the queue into main with commit a733298 Apr 28, 2023
@pefontana pefontana deleted the new-hint-46 branch April 28, 2023 15:50
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Add hint code

* Start implementing hint

* Implement hint

* Fix hint

* Add integration test

* Add changelog entry

* Expand test

* Update CHANGELOG.md

---------

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
whitelisted-hint Implementation of hint on whitelist directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants