Skip to content

feat: refactor CairoRunner ctors to accept CairoLayout directly#2363

Open
dorimedini-starkware wants to merge 1 commit into03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_paramsfrom
03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly
Open

feat: refactor CairoRunner ctors to accept CairoLayout directly#2363
dorimedini-starkware wants to merge 1 commit into03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_paramsfrom
03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware commented Mar 23, 2026

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.

This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.126 ± 0.025 2.106 2.194 1.01 ± 0.01
head big_factorial 2.108 ± 0.009 2.097 2.127 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.055 ± 0.007 2.045 2.069 1.01 ± 0.01
head big_fibonacci 2.042 ± 0.010 2.033 2.063 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.337 ± 0.112 7.226 7.525 1.02 ± 0.02
head blake2s_integration_benchmark 7.184 ± 0.079 7.121 7.341 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.179 ± 0.010 2.168 2.204 1.01 ± 0.01
head compare_arrays_200000 2.160 ± 0.016 2.145 2.190 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.439 ± 0.006 1.434 1.456 1.00
head dict_integration_benchmark 1.440 ± 0.004 1.434 1.445 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.219 ± 0.008 1.208 1.235 1.01 ± 0.01
head field_arithmetic_get_square_benchmark 1.204 ± 0.004 1.199 1.213 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.388 ± 0.070 7.328 7.578 1.01 ± 0.02
head integration_builtins 7.296 ± 0.101 7.224 7.568 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.471 ± 0.043 7.428 7.538 1.02 ± 0.01
head keccak_integration_benchmark 7.340 ± 0.029 7.308 7.400 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.161 ± 0.005 2.155 2.169 1.01 ± 0.01
head linear_search 2.149 ± 0.016 2.131 2.184 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.498 ± 0.002 1.495 1.500 1.00 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.497 ± 0.009 1.486 1.520 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.467 ± 0.007 1.460 1.480 1.01 ± 0.01
head math_integration_benchmark 1.457 ± 0.003 1.452 1.463 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.221 ± 0.003 1.216 1.225 1.00 ± 0.00
head memory_integration_benchmark 1.218 ± 0.005 1.210 1.225 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.542 ± 0.004 1.535 1.547 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.540 ± 0.012 1.526 1.570 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 531.8 ± 4.0 528.5 542.0 1.01 ± 0.01
head pedersen 528.9 ± 0.8 527.9 530.4 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 609.2 ± 1.2 607.0 610.9 1.00 ± 0.01
head poseidon_integration_benchmark 608.7 ± 5.0 604.9 622.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.815 ± 0.014 1.801 1.840 1.01 ± 0.01
head secp_integration_benchmark 1.795 ± 0.005 1.787 1.805 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 680.9 ± 2.5 677.6 685.0 1.08 ± 0.01
head set_integration_benchmark 631.9 ± 2.2 628.0 635.1 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.201 ± 0.058 4.151 4.358 1.01 ± 0.02
head uint256_integration_benchmark 4.143 ± 0.029 4.121 4.217 1.00

@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch from 858b764 to c71748f Compare March 25, 2026 13:23
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from 14d555d to a690cb4 Compare March 25, 2026 13:23
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.13%. Comparing base (a44f7b5) to head (274e737).

Additional details and impacted files
@@                                             Coverage Diff                                              @@
##           03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params    #2363      +/-   ##
============================================================================================================
+ Coverage                                                                     96.03%   96.13%   +0.09%     
============================================================================================================
  Files                                                                           104      104              
  Lines                                                                         37489    37498       +9     
============================================================================================================
+ Hits                                                                          36002    36047      +45     
+ Misses                                                                         1487     1451      -36     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from a690cb4 to a44f7b5 Compare March 25, 2026 13:37
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch 3 times, most recently from 600cd1f to 274e737 Compare March 25, 2026 14:38
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dorimedini-starkware made 1 comment.
Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on Yael-Starkware and YairVaknin-starkware).


vm/src/cairo_run.rs line 671 at r2 (raw file):

        )
        .unwrap();
    }

just for coverage of cairo_run_fuzzed_program

Code quote:

    #[cfg(feature = "test_utils")]
    #[test]
    fn test_cairo_run_fuzzed_program() {
        let program = Program::from_bytes(
            include_bytes!("../../cairo_programs/struct.json"),
            Some("main"),
        )
        .unwrap();
        let mut hint_processor = BuiltinHintProcessor::new_empty();
        cairo_run_fuzzed_program(
            program,
            &CairoRunConfig::default(),
            &mut hint_processor,
            1000,
        )
        .unwrap();
    }

Copy link
Copy Markdown
Collaborator

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

But, do you really need this to be merged? It's anyway being completely undone by PR2367. If it makes a mess for you, just leave it.

@YairVaknin-starkware reviewed 13 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Yael-Starkware).

@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch from 274e737 to 788b4a7 Compare April 9, 2026 19:15
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from a44f7b5 to 4d059c1 Compare April 9, 2026 19:15
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.

2 participants