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

Add test for uint256_mul_div_mod possible overflow #1328

Merged
merged 3 commits into from Jul 14, 2023
Merged

Conversation

pefontana
Copy link
Member

Add test for uint256_mul_div_mod possible overflow

Description

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.

@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 3.640 ± 0.010 3.626 3.661 1.00
head big_factorial 3.644 ± 0.020 3.627 3.692 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 3.144 ± 0.011 3.125 3.161 1.00
head big_fibonacci 3.150 ± 0.009 3.133 3.160 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 10.107 ± 0.164 9.983 10.504 1.00
head blake2s_integration_benchmark 10.176 ± 0.218 10.042 10.746 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.490 ± 0.017 3.457 3.512 1.00 ± 0.01
head compare_arrays_200000 3.481 ± 0.010 3.470 3.504 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.363 ± 0.010 2.348 2.377 1.00
head dict_integration_benchmark 2.372 ± 0.012 2.352 2.390 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.908 ± 0.021 1.883 1.938 1.00
head field_arithmetic_get_square_benchmark 1.909 ± 0.017 1.893 1.939 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 9.217 ± 0.128 8.903 9.391 1.03 ± 0.02
head integration_builtins 8.922 ± 0.058 8.845 9.044 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 10.625 ± 0.252 10.200 10.988 1.01 ± 0.04
head keccak_integration_benchmark 10.483 ± 0.378 10.150 11.255 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.763 ± 0.061 3.716 3.915 1.00
head linear_search 3.787 ± 0.202 3.496 4.030 1.01 ± 0.06
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.653 ± 0.009 2.640 2.666 1.00
head math_cmp_and_pow_integration_benchmark 2.747 ± 0.100 2.635 2.864 1.04 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.345 ± 0.125 2.265 2.578 1.03 ± 0.06
head math_integration_benchmark 2.273 ± 0.007 2.263 2.282 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.990 ± 0.006 1.982 2.005 1.00
head memory_integration_benchmark 1.995 ± 0.012 1.986 2.024 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.249 ± 0.010 2.236 2.271 1.00
head operations_with_data_structures_benchmarks 2.263 ± 0.011 2.252 2.280 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 814.0 ± 1.9 811.4 816.8 1.00 ± 0.00
head pedersen 813.1 ± 1.4 810.5 814.9 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.526 ± 0.004 1.523 1.537 1.00
head poseidon_integration_benchmark 1.529 ± 0.002 1.526 1.533 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.627 ± 0.008 2.616 2.638 1.00
head secp_integration_benchmark 2.629 ± 0.009 2.615 2.645 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.301 ± 0.003 1.296 1.306 1.00
head set_integration_benchmark 1.309 ± 0.026 1.296 1.382 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 6.557 ± 0.021 6.541 6.613 1.00
head uint256_integration_benchmark 6.598 ± 0.044 6.551 6.706 1.01 ± 0.01

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #1328 (74d9d7c) into main (2d5b2cc) will increase coverage by 0.35%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1328      +/-   ##
==========================================
+ Coverage   97.53%   97.88%   +0.35%     
==========================================
  Files          92       89       -3     
  Lines       37474    35469    -2005     
==========================================
- Hits        36549    34719    -1830     
+ Misses        925      750     -175     

see 3 files with indirect coverage changes

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

@Oppen Oppen added this pull request to the merge queue Jul 14, 2023
Merged via the queue into main with commit 9bf15bd Jul 14, 2023
34 checks passed
@Oppen Oppen deleted the add-uint256-test branch July 14, 2023 03:29
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jul 25, 2023
* Add test

* Fix Makefile compare commands

* Fix memory holes
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jul 25, 2023
* Add test

* Fix Makefile compare commands

* Fix memory 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.

Add test for the bug in hint uint256_mul_div_mod
3 participants