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 range_check96 builtin #1698

Merged
merged 14 commits into from
Apr 9, 2024
Merged

Add range_check96 builtin #1698

merged 14 commits into from
Apr 9, 2024

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Apr 4, 2024

Refactors RangeCheckBuiltinRunner to accomodate both standard and 96 variants
Adds range_check96 to all_cairo layout
Integration test added in #1699 as it depends on #1673

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 93.68421% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 94.96%. Comparing base (15f9dc0) to head (6500201).

Files Patch % Lines
vm/src/vm/runners/builtin_runner/range_check.rs 88.00% 6 Missing ⚠️
vm/src/vm/runners/cairo_runner.rs 86.95% 3 Missing ⚠️
vm/src/vm/runners/builtin_runner/mod.rs 97.10% 2 Missing ⚠️
vm/src/serde/deserialize_program.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1698      +/-   ##
==========================================
- Coverage   94.96%   94.96%   -0.01%     
==========================================
  Files          99       99              
  Lines       38474    38532      +58     
==========================================
+ Hits        36538    36592      +54     
- Misses       1936     1940       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Apr 4, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.298 ± 0.028 2.270 2.349 1.12 ± 0.02
head big_factorial 2.053 ± 0.018 2.027 2.081 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.260 ± 0.024 2.242 2.313 1.13 ± 0.02
head big_fibonacci 1.998 ± 0.025 1.968 2.058 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.646 ± 0.301 8.485 9.323 1.21 ± 0.05
head blake2s_integration_benchmark 7.125 ± 0.155 7.010 7.534 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.360 ± 0.030 2.330 2.412 1.12 ± 0.02
head compare_arrays_200000 2.116 ± 0.029 2.091 2.183 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.459 ± 0.008 1.451 1.477 1.05 ± 0.01
head dict_integration_benchmark 1.386 ± 0.005 1.373 1.391 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.329 ± 0.038 1.305 1.433 1.15 ± 0.03
head field_arithmetic_get_square_benchmark 1.160 ± 0.006 1.149 1.169 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.553 ± 0.092 8.497 8.729 1.19 ± 0.02
head integration_builtins 7.192 ± 0.069 7.088 7.308 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.895 ± 0.281 8.749 9.575 1.20 ± 0.06
head keccak_integration_benchmark 7.423 ± 0.248 7.262 8.115 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.363 ± 0.015 2.350 2.399 1.10 ± 0.02
head linear_search 2.143 ± 0.028 2.110 2.204 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.587 ± 0.008 1.578 1.597 1.05 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.515 ± 0.005 1.503 1.521 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.443 ± 0.022 1.422 1.481 1.04 ± 0.02
head math_integration_benchmark 1.384 ± 0.015 1.371 1.424 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.288 ± 0.013 1.269 1.311 1.08 ± 0.01
head memory_integration_benchmark 1.190 ± 0.007 1.174 1.197 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.634 ± 0.011 1.615 1.648 1.05 ± 0.02
head operations_with_data_structures_benchmarks 1.554 ± 0.027 1.534 1.617 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 596.1 ± 3.2 591.9 601.6 1.04 ± 0.01
head pedersen 572.0 ± 3.2 569.1 580.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 976.3 ± 3.3 971.1 984.3 1.01 ± 0.01
head poseidon_integration_benchmark 967.5 ± 7.5 956.6 977.8 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.889 ± 0.051 1.862 2.031 1.07 ± 0.03
head secp_integration_benchmark 1.772 ± 0.013 1.754 1.798 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 728.1 ± 5.8 720.4 739.1 1.00
head set_integration_benchmark 728.1 ± 4.7 722.9 737.2 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.729 ± 0.074 4.654 4.879 1.16 ± 0.02
head uint256_integration_benchmark 4.063 ± 0.031 4.032 4.124 1.00

@fmoletta fmoletta marked this pull request as ready for review April 4, 2024 19:58
@juanbono juanbono changed the title Add range_check96 bultin Add range_check96 builtin Apr 6, 2024
Copy link
Member

@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.

Amaizing one @fmoletta !!

@pefontana pefontana enabled auto-merge April 9, 2024 22:01
@pefontana pefontana added this pull request to the merge queue Apr 9, 2024
Merged via the queue into main with commit ca3b8ab Apr 9, 2024
69 of 70 checks passed
@pefontana pefontana deleted the range_check_96 branch April 9, 2024 22:48
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.

None yet

3 participants