Skip to content

Stav/remove prover input info #2149

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

Merged
merged 1 commit into from
Aug 6, 2025

Conversation

Stavbe
Copy link
Collaborator

@Stavbe Stavbe commented Aug 3, 2025

This change is Reviewable

@Stavbe Stavbe changed the base branch from main to starkware-development August 3, 2025 12:37
@Stavbe Stavbe requested a review from anatgstarkware August 3, 2025 14:29
@Stavbe Stavbe self-assigned this Aug 3, 2025
@Stavbe Stavbe force-pushed the stav/remove_prover_input_info branch from af4eb78 to a354647 Compare August 3, 2025 14:30
Copy link

github-actions bot commented Aug 3, 2025

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     25.782 s ±  0.021 s    [User: 24.986 s, System: 0.793 s]
  Range (min … max):   25.767 s … 25.797 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     25.801 s ±  0.043 s    [User: 24.925 s, System: 0.873 s]
  Range (min … max):   25.771 s … 25.831 s    2 runs
 
Summary
  hyper_threading_main threads: 1 ran
    1.00 ± 0.00 times faster than hyper_threading_pr threads: 1




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     14.388 s ±  0.042 s    [User: 25.168 s, System: 0.831 s]
  Range (min … max):   14.358 s … 14.417 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.035 s ±  0.043 s    [User: 24.964 s, System: 0.906 s]
  Range (min … max):   14.004 s … 14.065 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.03 ± 0.00 times faster than hyper_threading_main threads: 2




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     10.391 s ±  0.167 s    [User: 37.724 s, System: 1.039 s]
  Range (min … max):   10.273 s … 10.509 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.687 s ±  0.179 s    [User: 36.874 s, System: 1.079 s]
  Range (min … max):   10.560 s … 10.813 s    2 runs
 
Summary
  hyper_threading_main threads: 4 ran
    1.03 ± 0.02 times faster than hyper_threading_pr threads: 4




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     10.664 s ±  0.279 s    [User: 37.717 s, System: 1.042 s]
  Range (min … max):   10.467 s … 10.861 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.016 s ±  0.179 s    [User: 37.407 s, System: 1.132 s]
  Range (min … max):    9.889 s … 10.143 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.06 ± 0.03 times faster than hyper_threading_main threads: 6




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     10.387 s ±  0.003 s    [User: 38.135 s, System: 1.031 s]
  Range (min … max):   10.385 s … 10.389 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.110 s ±  0.134 s    [User: 37.619 s, System: 1.141 s]
  Range (min … max):   10.015 s … 10.205 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.03 ± 0.01 times faster than hyper_threading_main threads: 8




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     10.504 s ±  0.146 s    [User: 38.485 s, System: 1.118 s]
  Range (min … max):   10.401 s … 10.607 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.416 s ±  0.087 s    [User: 37.618 s, System: 1.210 s]
  Range (min … max):   10.354 s … 10.477 s    2 runs
 
Summary
  hyper_threading_pr threads: 16 ran
    1.01 ± 0.02 times faster than hyper_threading_main threads: 16


@Stavbe Stavbe force-pushed the stav/remove_prover_input_info branch from a354647 to a448ce5 Compare August 3, 2025 14:43
Copy link

github-actions bot commented Aug 3, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.155 ± 0.008 2.144 2.167 1.00
head big_factorial 2.163 ± 0.030 2.144 2.248 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.093 ± 0.020 2.075 2.143 1.00 ± 0.01
head big_fibonacci 2.090 ± 0.021 2.073 2.134 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.700 ± 0.096 7.640 7.966 1.01 ± 0.02
head blake2s_integration_benchmark 7.630 ± 0.074 7.535 7.782 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.230 ± 0.011 2.218 2.255 1.01 ± 0.01
head compare_arrays_200000 2.209 ± 0.013 2.192 2.242 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.446 ± 0.019 1.431 1.488 1.01 ± 0.01
head dict_integration_benchmark 1.438 ± 0.004 1.431 1.447 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.238 ± 0.005 1.232 1.246 1.01 ± 0.00
head field_arithmetic_get_square_benchmark 1.231 ± 0.002 1.227 1.235 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.765 ± 0.103 7.687 8.039 1.01 ± 0.01
head integration_builtins 7.683 ± 0.035 7.623 7.729 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.936 ± 0.173 7.798 8.383 1.01 ± 0.03
head keccak_integration_benchmark 7.880 ± 0.094 7.771 8.023 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.202 ± 0.007 2.187 2.213 1.00 ± 0.00
head linear_search 2.194 ± 0.005 2.188 2.206 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.535 ± 0.020 1.518 1.585 1.00
head math_cmp_and_pow_integration_benchmark 1.539 ± 0.032 1.519 1.629 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.465 ± 0.006 1.459 1.474 1.00
head math_integration_benchmark 1.478 ± 0.015 1.465 1.516 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.231 ± 0.006 1.224 1.240 1.00 ± 0.01
head memory_integration_benchmark 1.226 ± 0.007 1.219 1.243 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.564 ± 0.017 1.552 1.611 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.558 ± 0.011 1.551 1.588 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 540.3 ± 2.0 538.6 544.3 1.01 ± 0.00
head pedersen 536.8 ± 1.4 534.5 538.7 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 628.9 ± 3.8 623.6 634.5 1.00
head poseidon_integration_benchmark 633.4 ± 4.9 626.8 642.6 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.847 ± 0.011 1.832 1.867 1.01 ± 0.01
head secp_integration_benchmark 1.823 ± 0.015 1.811 1.861 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 666.8 ± 4.4 658.8 671.0 1.00
head set_integration_benchmark 684.9 ± 3.4 680.9 690.4 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.343 ± 0.028 4.306 4.402 1.01 ± 0.01
head uint256_integration_benchmark 4.293 ± 0.015 4.268 4.324 1.00

Copy link
Collaborator

@anatgstarkware anatgstarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @Stavbe)


vm/src/vm/runners/cairo_runner.rs line 1532 at r1 (raw file):

    }

    /// Returns a map from the builtin segment index into its name.

Add to the documentation the fact that Arena isn't returned

Code quote:

/// Returns a map from the builtin segment index into its name.

@Stavbe Stavbe force-pushed the stav/remove_prover_input_info branch from a448ce5 to cde7b3f Compare August 4, 2025 13:35
Copy link
Collaborator Author

@Stavbe Stavbe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @anatgstarkware)


vm/src/vm/runners/cairo_runner.rs line 1532 at r1 (raw file):

Previously, anatgstarkware (anatg) wrote…

Add to the documentation the fact that Arena isn't returned

Deleted as discussed

Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.63%. Comparing base (1a224f8) to head (9814009).
⚠️ Report is 1 commits behind head on starkware-development.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           starkware-development    #2149   +/-   ##
======================================================
  Coverage                  96.63%   96.63%           
======================================================
  Files                        104      103    -1     
  Lines                      43915    43865   -50     
======================================================
- Hits                       42436    42389   -47     
+ Misses                      1479     1476    -3     

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

Copy link
Collaborator

@anatgstarkware anatgstarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @Stavbe)


vm/src/vm/runners/cairo_runner.rs line 1513 at r2 (raw file):

            .trace
            .as_deref()
            .ok_or(TraceError::TraceNotEnabled)?)

Suggestion:

        self
            .vm
            .trace
            .as_deref()
            .ok_or(TraceError::TraceNotEnabled)

vm/src/vm/runners/cairo_runner.rs line 1528 at r2 (raw file):

    /// Returns a reference to the public memory offsets.
    pub fn get_public_memory_offsets(&self) -> &HashMap<usize, Vec<(usize, usize)>> {

Is this one necessary?

Code quote:

pub fn get_public_memory_offsets(&self)

Copy link
Collaborator

@anatgstarkware anatgstarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 3 unresolved discussions (waiting on @Stavbe)


vm/src/vm/runners/cairo_runner.rs line 1533 at r2 (raw file):

    /// Returns a map from the builtin segment index into its name.
    pub fn get_builtins_segments(&self) -> BTreeMap<usize, BuiltinName> {

Suggestion:

get_builtin_segments

@Stavbe Stavbe force-pushed the stav/remove_prover_input_info branch from cde7b3f to ac3a5f0 Compare August 5, 2025 12:48
Copy link
Collaborator Author

@Stavbe Stavbe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @anatgstarkware)


vm/src/vm/runners/cairo_runner.rs line 1528 at r2 (raw file):

Previously, anatgstarkware (anatg) wrote…

Is this one necessary?

Nope


vm/src/vm/runners/cairo_runner.rs line 1513 at r2 (raw file):

            .trace
            .as_deref()
            .ok_or(TraceError::TraceNotEnabled)?)

Done.

@Stavbe Stavbe force-pushed the stav/remove_prover_input_info branch from ac3a5f0 to 9814009 Compare August 5, 2025 13:48
Copy link
Collaborator

@anatgstarkware anatgstarkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 4 files at r1, 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Stavbe)

@Stavbe Stavbe merged commit d3c649c into starkware-development Aug 6, 2025
92 of 93 checks passed
@Stavbe Stavbe deleted the stav/remove_prover_input_info branch August 6, 2025 08:44
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