Skip to content

Conversation

Stavbe
Copy link
Collaborator

@Stavbe Stavbe commented Jun 23, 2025

This change is Reviewable

@Stavbe Stavbe self-assigned this Jun 23, 2025
@Stavbe Stavbe changed the base branch from main to starkware-development June 23, 2025 10:25
@Stavbe Stavbe force-pushed the stav/remove_clone_trace branch from 8a6ed29 to 8fbd881 Compare June 23, 2025 10:35
Copy link

github-actions bot commented Jun 23, 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.556 s ±  0.054 s    [User: 24.788 s, System: 0.765 s]
  Range (min … max):   25.517 s … 25.594 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     25.678 s ±  0.011 s    [User: 24.842 s, System: 0.832 s]
  Range (min … max):   25.670 s … 25.686 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.241 s ±  0.023 s    [User: 24.888 s, System: 0.842 s]
  Range (min … max):   14.225 s … 14.258 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     13.924 s ±  0.013 s    [User: 24.872 s, System: 0.873 s]
  Range (min … max):   13.915 s … 13.933 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.02 ± 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.901 s ±  0.021 s    [User: 37.249 s, System: 0.969 s]
  Range (min … max):   10.886 s … 10.916 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.045 s ±  0.034 s    [User: 37.365 s, System: 1.064 s]
  Range (min … max):   10.021 s … 10.069 s    2 runs
 
Summary
  hyper_threading_pr threads: 4 ran
    1.09 ± 0.00 times faster than hyper_threading_main 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.456 s ±  0.167 s    [User: 37.844 s, System: 1.014 s]
  Range (min … max):   10.338 s … 10.574 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.239 s ±  0.048 s    [User: 37.443 s, System: 1.033 s]
  Range (min … max):   10.205 s … 10.273 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.02 ± 0.02 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.267 s ±  0.325 s    [User: 38.338 s, System: 0.983 s]
  Range (min … max):   10.037 s … 10.497 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.065 s ±  0.146 s    [User: 37.634 s, System: 1.105 s]
  Range (min … max):    9.962 s … 10.168 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.02 ± 0.04 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.531 s ±  0.136 s    [User: 38.384 s, System: 1.078 s]
  Range (min … max):   10.435 s … 10.627 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.315 s ±  0.183 s    [User: 37.700 s, System: 1.118 s]
  Range (min … max):   10.186 s … 10.444 s    2 runs
 
Summary
  hyper_threading_pr threads: 16 ran
    1.02 ± 0.02 times faster than hyper_threading_main threads: 16


Copy link

github-actions bot commented Jun 23, 2025

Benchmark Results for modified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
head big_factorial 2.111 ± 0.021 2.085 2.151 1.00
Command Mean [s] Min [s] Max [s] Relative
head big_fibonacci 2.046 ± 0.016 2.021 2.081 1.00
Command Mean [s] Min [s] Max [s] Relative
head blake2s_integration_benchmark 7.545 ± 0.137 7.410 7.889 1.00
Command Mean [s] Min [s] Max [s] Relative
head compare_arrays_200000 2.201 ± 0.020 2.157 2.224 1.00
Command Mean [s] Min [s] Max [s] Relative
head dict_integration_benchmark 1.420 ± 0.014 1.392 1.435 1.00
Command Mean [s] Min [s] Max [s] Relative
head field_arithmetic_get_square_benchmark 1.210 ± 0.013 1.190 1.234 1.00
Command Mean [s] Min [s] Max [s] Relative
head integration_builtins 7.646 ± 0.218 7.452 8.144 1.00
Command Mean [s] Min [s] Max [s] Relative
head keccak_integration_benchmark 7.757 ± 0.161 7.409 7.952 1.00
Command Mean [s] Min [s] Max [s] Relative
head linear_search 2.105 ± 0.021 2.077 2.134 1.00
Command Mean [s] Min [s] Max [s] Relative
head math_cmp_and_pow_integration_benchmark 1.449 ± 0.008 1.441 1.465 1.00
Command Mean [s] Min [s] Max [s] Relative
head math_integration_benchmark 1.409 ± 0.027 1.384 1.475 1.00
Command Mean [s] Min [s] Max [s] Relative
head memory_integration_benchmark 1.167 ± 0.009 1.155 1.185 1.00
Command Mean [s] Min [s] Max [s] Relative
head operations_with_data_structures_benchmarks 1.511 ± 0.016 1.482 1.539 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head pedersen 527.8 ± 5.8 516.5 536.6 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head poseidon_integration_benchmark 597.3 ± 11.1 583.7 620.3 1.00
Command Mean [s] Min [s] Max [s] Relative
head secp_integration_benchmark 1.818 ± 0.027 1.774 1.868 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
head set_integration_benchmark 625.7 ± 3.9 618.1 631.9 1.00
Command Mean [s] Min [s] Max [s] Relative
head uint256_integration_benchmark 4.243 ± 0.056 4.154 4.307 1.00

@Stavbe Stavbe force-pushed the stav/remove_clone_trace branch from 8fbd881 to b275a7b Compare June 23, 2025 10:53
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.63%. Comparing base (15de4b2) to head (9277002).
Report is 2 commits behind head on starkware-development.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           starkware-development    #2127      +/-   ##
=========================================================
- Coverage                  96.63%   96.63%   -0.01%     
=========================================================
  Files                        104      104              
  Lines                      43905    43903       -2     
=========================================================
- Hits                       42429    42427       -2     
  Misses                      1476     1476              

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

@FrancoGiachetta
Copy link
Contributor

FrancoGiachetta commented Jun 23, 2025

I would mark this PR as a breaking change since it changes get_prover_input_info (a public function) to receive a mutable reference.

@Stavbe Stavbe requested a review from anatgstarkware June 23, 2025 14:04
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:

Please mark as a breaking change before merging

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Stavbe)


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

    /// Collects relevant information for the prover from the runner, including the
    /// relocatable form of the trace, memory, public memory, and built-ins.
    /// Remove the trace from the VM.

Suggestion:

Takes ownership of the trace from the VM

@Stavbe Stavbe force-pushed the stav/remove_clone_trace branch from b275a7b to c72ff90 Compare June 26, 2025 10:47
@Stavbe Stavbe force-pushed the stav/remove_clone_trace branch from c72ff90 to 9277002 Compare June 26, 2025 11:01
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.

Hey @FrancoGiachetta , is it OK?

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @anatgstarkware and @Stavbe)

@FrancoGiachetta
Copy link
Contributor

It is! Thanks!

@Stavbe Stavbe merged commit b85e5c6 into starkware-development Jun 26, 2025
93 checks passed
@Stavbe Stavbe deleted the stav/remove_clone_trace branch June 26, 2025 14:36
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.

3 participants