Skip to content

[DNM] feat: implement VirtualMachine::is_accessed #2028

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

Closed
wants to merge 1 commit into from

Conversation

JulianGCalderon
Copy link
Contributor

Clone of #2024, to make CI run.

Signed-off-by: Dori Medini <[email protected]>

refactor: implement get_cell to share code

Signed-off-by: Dori Medini <[email protected]>

chore: changelog entry

Signed-off-by: Dori Medini <[email protected]>
Copy link

**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.303 s ±  0.006 s    [User: 25.544 s, System: 0.757 s]
  Range (min … max):   26.299 s … 26.307 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     26.408 s ±  0.013 s    [User: 25.630 s, System: 0.777 s]
  Range (min … max):   26.399 s … 26.418 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.609 s ±  0.042 s    [User: 25.638 s, System: 0.767 s]
  Range (min … max):   14.579 s … 14.638 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.689 s ±  0.010 s    [User: 25.735 s, System: 0.768 s]
  Range (min … max):   14.682 s … 14.696 s    2 runs
 
Summary
  hyper_threading_main threads: 2 ran
    1.01 ± 0.00 times faster than hyper_threading_pr 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.529 s ±  0.198 s    [User: 38.065 s, System: 0.912 s]
  Range (min … max):   10.389 s … 10.669 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.853 s ±  0.161 s    [User: 37.955 s, System: 0.900 s]
  Range (min … max):   10.739 s … 10.967 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.580 s ±  0.105 s    [User: 37.932 s, System: 0.934 s]
  Range (min … max):   10.506 s … 10.654 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.520 s ±  0.306 s    [User: 38.504 s, System: 0.941 s]
  Range (min … max):   10.303 s … 10.736 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.01 ± 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.356 s ±  0.096 s    [User: 38.427 s, System: 0.939 s]
  Range (min … max):   10.288 s … 10.424 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.383 s ±  0.130 s    [User: 38.476 s, System: 0.935 s]
  Range (min … max):   10.291 s … 10.474 s    2 runs
 
Summary
  hyper_threading_main threads: 8 ran
    1.00 ± 0.02 times faster than hyper_threading_pr 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.363 s ±  0.104 s    [User: 38.616 s, System: 1.020 s]
  Range (min … max):   10.290 s … 10.437 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.578 s ±  0.033 s    [User: 38.754 s, System: 1.014 s]
  Range (min … max):   10.555 s … 10.601 s    2 runs
 
Summary
  hyper_threading_main threads: 16 ran
    1.02 ± 0.01 times faster than hyper_threading_pr threads: 16


Copy link

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.132 ± 0.012 2.118 2.157 1.00 ± 0.01
head big_factorial 2.126 ± 0.022 2.107 2.180 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.041 ± 0.011 2.021 2.059 1.00
head big_fibonacci 2.066 ± 0.012 2.050 2.091 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.595 ± 0.106 7.463 7.740 1.00
head blake2s_integration_benchmark 7.595 ± 0.119 7.502 7.874 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.215 ± 0.018 2.196 2.253 1.01 ± 0.01
head compare_arrays_200000 2.196 ± 0.012 2.181 2.219 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.433 ± 0.004 1.427 1.440 1.00
head dict_integration_benchmark 1.433 ± 0.006 1.426 1.442 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.215 ± 0.007 1.208 1.226 1.00 ± 0.01
head field_arithmetic_get_square_benchmark 1.215 ± 0.011 1.206 1.242 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.603 ± 0.051 7.538 7.718 1.00
head integration_builtins 7.614 ± 0.040 7.565 7.680 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.836 ± 0.040 7.787 7.915 1.00
head keccak_integration_benchmark 7.947 ± 0.233 7.824 8.573 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.176 ± 0.025 2.153 2.237 1.00 ± 0.01
head linear_search 2.172 ± 0.013 2.158 2.203 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.524 ± 0.012 1.507 1.547 1.00 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.522 ± 0.008 1.509 1.533 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.474 ± 0.011 1.460 1.495 1.00 ± 0.02
head math_integration_benchmark 1.470 ± 0.021 1.449 1.527 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.215 ± 0.005 1.209 1.223 1.00
head memory_integration_benchmark 1.223 ± 0.011 1.214 1.244 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.585 ± 0.019 1.568 1.632 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.584 ± 0.012 1.568 1.608 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 534.7 ± 3.7 530.9 542.7 1.00 ± 0.01
head pedersen 533.9 ± 4.0 530.6 544.5 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 647.7 ± 7.2 634.1 657.0 1.01 ± 0.02
head poseidon_integration_benchmark 642.1 ± 7.7 633.7 656.2 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.846 ± 0.007 1.837 1.858 1.00
head secp_integration_benchmark 1.852 ± 0.006 1.847 1.867 1.00 ± 0.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 684.3 ± 3.1 680.8 691.2 1.08 ± 0.01
head set_integration_benchmark 633.1 ± 3.1 629.9 639.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.210 ± 0.017 4.187 4.243 1.00
head uint256_integration_benchmark 4.212 ± 0.045 4.179 4.318 1.00 ± 0.01

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

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

Project coverage is 96.51%. Comparing base (7c4ecdf) to head (8404678).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
vm/src/vm/vm_memory/memory.rs 57.14% 6 Missing ⚠️
vm/src/vm/vm_core.rs 0.00% 3 Missing ⚠️
vm/src/vm/vm_memory/memory_segments.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2028      +/-   ##
==========================================
- Coverage   96.53%   96.51%   -0.03%     
==========================================
  Files         102      102              
  Lines       42726    42741      +15     
==========================================
+ Hits        41247    41250       +3     
- Misses       1479     1491      +12     

☔ 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
Copy link
Collaborator

opened a "real" PR here, please close this

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