Skip to content

Conversation

@JulianGCalderon
Copy link
Contributor

Improve Documentation

Adds some comments in the code to make it easier to understand.

@JulianGCalderon JulianGCalderon added the documentation Improvements or additions to documentation label Mar 14, 2025
@github-actions
Copy link

github-actions bot commented Mar 14, 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 ± σ):     26.267 s ±  0.097 s    [User: 25.498 s, System: 0.767 s]
  Range (min … max):   26.199 s … 26.335 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     26.333 s ±  0.061 s    [User: 25.554 s, System: 0.776 s]
  Range (min … max):   26.290 s … 26.376 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.701 s ±  0.139 s    [User: 25.698 s, System: 0.868 s]
  Range (min … max):   14.602 s … 14.799 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.619 s ±  0.015 s    [User: 25.594 s, System: 0.799 s]
  Range (min … max):   14.609 s … 14.630 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.01 ± 0.01 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 ± σ):     11.039 s ±  0.036 s    [User: 37.929 s, System: 0.952 s]
  Range (min … max):   11.013 s … 11.064 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.913 s ±  0.018 s    [User: 37.897 s, System: 0.954 s]
  Range (min … max):   10.900 s … 10.925 s    2 runs
 
Summary
  hyper_threading_pr threads: 4 ran
    1.01 ± 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.737 s ±  0.110 s    [User: 38.063 s, System: 0.937 s]
  Range (min … max):   10.660 s … 10.815 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.729 s ±  0.075 s    [User: 38.153 s, System: 0.953 s]
  Range (min … max):   10.675 s … 10.782 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.00 ± 0.01 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.449 s ±  0.019 s    [User: 38.678 s, System: 0.943 s]
  Range (min … max):   10.435 s … 10.462 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.393 s ±  0.009 s    [User: 38.775 s, System: 0.946 s]
  Range (min … max):   10.387 s … 10.400 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.01 ± 0.00 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.497 s ±  0.202 s    [User: 39.204 s, System: 1.071 s]
  Range (min … max):   10.354 s … 10.640 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.373 s ±  0.066 s    [User: 38.952 s, System: 1.076 s]
  Range (min … max):   10.326 s … 10.420 s    2 runs
 
Summary
  hyper_threading_pr threads: 16 ran
    1.01 ± 0.02 times faster than hyper_threading_main threads: 16


@github-actions
Copy link

github-actions bot commented Mar 14, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.178 ± 0.026 2.145 2.226 1.00 ± 0.01
head big_factorial 2.170 ± 0.020 2.146 2.206 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.102 ± 0.029 2.075 2.173 1.00 ± 0.02
head big_fibonacci 2.101 ± 0.020 2.084 2.141 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.906 ± 0.063 7.763 7.997 1.00
head blake2s_integration_benchmark 7.976 ± 0.195 7.773 8.238 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.238 ± 0.016 2.221 2.260 1.00 ± 0.01
head compare_arrays_200000 2.233 ± 0.020 2.202 2.263 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.470 ± 0.008 1.457 1.480 1.01 ± 0.01
head dict_integration_benchmark 1.459 ± 0.012 1.439 1.481 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.247 ± 0.011 1.232 1.262 1.00
head field_arithmetic_get_square_benchmark 1.252 ± 0.012 1.235 1.269 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.909 ± 0.076 7.785 8.021 1.00 ± 0.01
head integration_builtins 7.899 ± 0.069 7.824 7.989 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.197 ± 0.074 8.054 8.302 1.00
head keccak_integration_benchmark 8.201 ± 0.060 8.108 8.338 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.213 ± 0.019 2.189 2.256 1.00
head linear_search 2.221 ± 0.030 2.191 2.298 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.547 ± 0.009 1.532 1.562 1.00
head math_cmp_and_pow_integration_benchmark 1.556 ± 0.008 1.545 1.567 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.489 ± 0.010 1.475 1.509 1.00
head math_integration_benchmark 1.489 ± 0.010 1.480 1.513 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.244 ± 0.009 1.233 1.260 1.00 ± 0.01
head memory_integration_benchmark 1.241 ± 0.008 1.232 1.255 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.596 ± 0.008 1.583 1.605 1.00
head operations_with_data_structures_benchmarks 1.612 ± 0.007 1.602 1.626 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 540.2 ± 3.0 536.9 546.0 1.00
head pedersen 541.2 ± 7.2 536.1 560.3 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 644.3 ± 9.4 631.4 657.3 1.00
head poseidon_integration_benchmark 646.9 ± 7.9 633.9 659.0 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.885 ± 0.013 1.862 1.908 1.00
head secp_integration_benchmark 1.887 ± 0.006 1.878 1.897 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 664.9 ± 4.5 657.7 672.9 1.00
head set_integration_benchmark 673.4 ± 6.0 665.0 685.1 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.336 ± 0.039 4.263 4.375 1.00
head uint256_integration_benchmark 4.348 ± 0.047 4.285 4.424 1.00 ± 0.01

Copy link
Contributor

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

Left some wording suggestions, but looks good! 🚀

@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.53%. Comparing base (60c1fa0) to head (20b6534).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2006   +/-   ##
=======================================
  Coverage   96.53%   96.53%           
=======================================
  Files         103      103           
  Lines       42619    42619           
=======================================
  Hits        41142    41142           
  Misses       1477     1477           

☔ 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

LGTM, just one dummy suggestion and it's good to go.

@edg-l edg-l enabled auto-merge March 17, 2025 13:41
@edg-l edg-l added this pull request to the merge queue Mar 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 17, 2025
@JulianGCalderon JulianGCalderon added this pull request to the merge queue Mar 17, 2025
Merged via the queue into main with commit 43b85a1 Mar 17, 2025
93 checks passed
@JulianGCalderon JulianGCalderon deleted the add-comments branch March 17, 2025 15:34
gabrielbosio pushed a commit that referenced this pull request May 21, 2025
* Add comment on proof-mode extra step

* Add comment on temporary segments

* Update vm/src/vm/vm_memory/memory.rs

Co-authored-by: fmoletta <[email protected]>

* Update vm/src/vm/vm_memory/memory.rs

Co-authored-by: fmoletta <[email protected]>

* Update vm/src/vm/vm_memory/memory.rs

Co-authored-by: Franco Giachetta <[email protected]>

---------

Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Franco Giachetta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants