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): add NewHint#32 #1010

Merged
merged 8 commits into from
Apr 20, 2023
Merged

feat(hints): add NewHint#32 #1010

merged 8 commits into from
Apr 20, 2023

Conversation

MegaRedHand
Copy link
Contributor

Description

This PR adds the missing hint NewHint#32, now known as IS_ZERO_INT.

@MegaRedHand MegaRedHand added the whitelisted-hint Implementation of hint on whitelist directory label Apr 18, 2023
@MegaRedHand MegaRedHand self-assigned this Apr 18, 2023
@github-actions
Copy link

github-actions bot commented Apr 18, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 2.624 ± 0.030 2.597 2.687 1.00 ± 0.02
head blake2s_integration_benchmark 2.623 ± 0.026 2.603 2.696 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.307 ± 0.041 3.256 3.375 1.01 ± 0.01
head compare_arrays_200000 3.281 ± 0.021 3.259 3.320 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.509 ± 0.012 2.492 2.527 1.00
head dict_integration_benchmark 2.520 ± 0.014 2.496 2.544 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 3.954 ± 0.014 3.938 3.978 1.00 ± 0.01
head factorial_multirun 3.941 ± 0.019 3.921 3.979 1.00
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.170 ± 0.016 3.146 3.205 1.00
head fibonacci_1000_multirun 3.173 ± 0.032 3.151 3.253 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 3.213 ± 0.039 3.179 3.300 1.00
head integration_builtins 3.223 ± 0.044 3.200 3.344 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 2.819 ± 0.065 2.789 3.002 1.01 ± 0.02
head keccak_integration_benchmark 2.787 ± 0.010 2.776 2.807 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.382 ± 0.016 3.364 3.410 1.00 ± 0.01
head linear_search 3.377 ± 0.016 3.363 3.404 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.837 ± 0.022 2.816 2.890 1.00 ± 0.01
head math_cmp_and_pow_integration_benchmark 2.827 ± 0.009 2.810 2.843 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.621 ± 0.023 2.602 2.673 1.00
head math_integration_benchmark 2.669 ± 0.131 2.610 3.041 1.02 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.245 ± 0.010 2.230 2.265 1.00
head memory_integration_benchmark 2.248 ± 0.005 2.240 2.257 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.321 ± 0.007 2.312 2.335 1.00
head operations_with_data_structures_benchmarks 2.323 ± 0.013 2.309 2.344 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base pedersen 3.229 ± 0.011 3.218 3.249 1.00 ± 0.00
head pedersen 3.221 ± 0.002 3.217 3.224 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.542 ± 0.004 1.538 1.550 1.00 ± 0.00
head poseidon_integration_benchmark 1.541 ± 0.004 1.537 1.548 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.460 ± 0.008 2.448 2.472 1.00
head secp_integration_benchmark 2.470 ± 0.022 2.448 2.521 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.722 ± 0.035 1.707 1.820 1.01 ± 0.02
head set_integration_benchmark 1.706 ± 0.005 1.698 1.712 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.082 ± 0.034 4.055 4.176 1.00 ± 0.01
head uint256_integration_benchmark 4.079 ± 0.010 4.064 4.096 1.00

@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #1010 (20fb800) into main (4bc5541) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1010   +/-   ##
=======================================
  Coverage   98.04%   98.04%           
=======================================
  Files          77       77           
  Lines       31927    31866   -61     
=======================================
- Hits        31303    31244   -59     
+ Misses        624      622    -2     
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor_definition.rs 98.81% <100.00%> (ø)
...ocessor/builtin_hint_processor/secp/field_utils.rs 99.68% <100.00%> (+0.47%) ⬆️

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

@Oppen
Copy link
Contributor

Oppen commented Apr 18, 2023

I'm not sure what's wrong with Pedersen but it's the third time it erratically reports becoming much slower only to normalize later. I'll review it later, but could you trigger the benchmarks before merging just in case?

This disables async-timeout, that's only used for async tests.
@MegaRedHand MegaRedHand enabled auto-merge April 19, 2023 23:44
@MegaRedHand MegaRedHand added this pull request to the merge queue Apr 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Apr 20, 2023
@Oppen Oppen enabled auto-merge April 20, 2023 01:00
@Oppen Oppen added this pull request to the merge queue Apr 20, 2023
Merged via the queue into main with commit 14cee59 Apr 20, 2023
@Oppen Oppen deleted the newhint32-is_zero_int branch April 20, 2023 01:49
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Add NewHint#32

* Update changelog

* Add rstest dependency and use it

* Trigger benchmarks at @Oppen's request

* Disable default features in rstest

This disables async-timeout, that's only used for async tests.

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.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