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): "full word" from cairo_keccak.json #1058

Merged
merged 3 commits into from
Apr 27, 2023
Merged

Conversation

Oppen
Copy link
Member

@Oppen Oppen commented Apr 26, 2023

Last remaining hint from whitelist cairo_keccak.json. The branch's name comes from its similarity to that of SHA256_INPUT. It turns out it's used for _copy_input instead, so it's misleading.
The hint:

ids.full_word = int(ids.n_bytes >= 8)

Fixes #1020

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.

@Oppen Oppen added the whitelisted-hint Implementation of hint on whitelist directory label Apr 26, 2023
@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.509 ± 0.029 2.476 2.570 1.00 ± 0.02
head blake2s_integration_benchmark 2.508 ± 0.039 2.475 2.595 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.050 ± 0.041 2.996 3.118 1.01 ± 0.02
head compare_arrays_200000 3.009 ± 0.028 2.985 3.081 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.408 ± 0.011 2.395 2.426 1.01 ± 0.01
head dict_integration_benchmark 2.396 ± 0.017 2.365 2.424 1.00
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 3.757 ± 0.015 3.737 3.775 1.01 ± 0.01
head factorial_multirun 3.730 ± 0.020 3.708 3.769 1.00
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.024 ± 0.017 3.001 3.050 1.01 ± 0.01
head fibonacci_1000_multirun 3.005 ± 0.029 2.979 3.067 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 130.0 ± 1.3 128.5 132.1 1.00
head field_arithmetic_get_square_benchmark 132.3 ± 3.2 129.7 139.5 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 2.986 ± 0.033 2.955 3.056 1.02 ± 0.01
head integration_builtins 2.939 ± 0.010 2.923 2.960 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 2.678 ± 0.063 2.645 2.856 1.00 ± 0.02
head keccak_integration_benchmark 2.667 ± 0.019 2.646 2.708 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.164 ± 0.016 3.146 3.194 1.00
head linear_search 3.187 ± 0.041 3.143 3.271 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.695 ± 0.025 2.660 2.750 1.00
head math_cmp_and_pow_integration_benchmark 2.713 ± 0.028 2.683 2.768 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.475 ± 0.009 2.461 2.496 1.00
head math_integration_benchmark 2.481 ± 0.010 2.467 2.494 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.131 ± 0.011 2.118 2.153 1.01 ± 0.01
head memory_integration_benchmark 2.120 ± 0.011 2.104 2.140 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.241 ± 0.045 2.214 2.363 1.00 ± 0.02
head operations_with_data_structures_benchmarks 2.233 ± 0.020 2.222 2.288 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 784.0 ± 6.3 780.2 801.0 1.00 ± 0.01
head pedersen 782.0 ± 4.0 777.9 790.3 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.516 ± 0.021 1.500 1.571 1.01 ± 0.01
head poseidon_integration_benchmark 1.507 ± 0.004 1.501 1.514 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.353 ± 0.009 2.342 2.371 1.00
head secp_integration_benchmark 2.361 ± 0.014 2.340 2.387 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.685 ± 0.015 1.675 1.727 1.00
head set_integration_benchmark 1.689 ± 0.018 1.669 1.726 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.901 ± 0.020 3.884 3.934 1.00 ± 0.01
head uint256_integration_benchmark 3.898 ± 0.020 3.880 3.949 1.00

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #1058 (b5cc938) into main (0fad948) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1058   +/-   ##
=======================================
  Coverage   98.10%   98.10%           
=======================================
  Files          84       84           
  Lines       33994    34008   +14     
=======================================
+ Hits        33349    33363   +14     
  Misses        645      645           
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor_definition.rs 99.01% <100.00%> (+<0.01%) ⬆️
...uiltin_hint_processor/cairo_keccak/keccak_hints.rs 94.09% <100.00%> (+0.25%) ⬆️

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

@Oppen Oppen force-pushed the feat(hint)/68-sha512_input branch 3 times, most recently from fee8cdf to caf069e Compare April 26, 2023 09:49
@Oppen Oppen force-pushed the feat(hint)/68-sha512_input branch from caf069e to 7b151ef Compare April 26, 2023 09:58
@Oppen Oppen enabled auto-merge April 27, 2023 15:34
@Oppen Oppen added this pull request to the merge queue Apr 27, 2023
Merged via the queue into main with commit 514bd83 Apr 27, 2023
30 checks passed
@Oppen Oppen deleted the feat(hint)/68-sha512_input branch April 27, 2023 16:05
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
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.

[New Hints] cairo_keccak.json
3 participants