Skip to content
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

fix: Don't assume output builtin is first when counting memory holes #1811

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Jul 30, 2024

No description provided.

Copy link

github-actions bot commented Jul 30, 2024

**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.923 s ±  0.047 s    [User: 25.121 s, System: 0.800 s]
  Range (min … max):   25.889 s … 25.956 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     26.846 s ±  0.029 s    [User: 26.017 s, System: 0.827 s]
  Range (min … max):   26.826 s … 26.867 s    2 runs
 
Summary
  'hyper_threading_main threads: 1' ran
    1.04 ± 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.737 s ±  0.042 s    [User: 25.776 s, System: 0.834 s]
  Range (min … max):   14.708 s … 14.767 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.984 s ±  0.031 s    [User: 26.573 s, System: 0.811 s]
  Range (min … max):   14.962 s … 15.006 s    2 runs
 
Summary
  'hyper_threading_main threads: 2' ran
    1.02 ± 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.923 s ±  0.005 s    [User: 37.297 s, System: 0.903 s]
  Range (min … max):   10.919 s … 10.926 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.725 s ±  0.150 s    [User: 38.396 s, System: 0.978 s]
  Range (min … max):   10.619 s … 10.831 s    2 runs
 
Summary
  'hyper_threading_pr threads: 4' ran
    1.02 ± 0.01 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.260 s ±  0.233 s    [User: 37.698 s, System: 0.972 s]
  Range (min … max):   10.095 s … 10.425 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.785 s ±  0.092 s    [User: 38.310 s, System: 1.010 s]
  Range (min … max):   10.720 s … 10.850 s    2 runs
 
Summary
  'hyper_threading_main threads: 6' ran
    1.05 ± 0.03 times faster than 'hyper_threading_pr 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.376 s ±  0.015 s    [User: 37.627 s, System: 1.070 s]
  Range (min … max):   10.365 s … 10.386 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.441 s ±  0.100 s    [User: 39.224 s, System: 0.956 s]
  Range (min … max):   10.370 s … 10.511 s    2 runs
 
Summary
  'hyper_threading_main threads: 8' ran
    1.01 ± 0.01 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.011 s ±  0.031 s    [User: 38.133 s, System: 1.097 s]
  Range (min … max):    9.988 s … 10.033 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.391 s ±  0.006 s    [User: 39.441 s, System: 1.024 s]
  Range (min … max):   10.387 s … 10.395 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.04 ± 0.00 times faster than 'hyper_threading_pr threads: 16'


Copy link

github-actions bot commented Jul 30, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.076 ± 0.053 2.027 2.177 1.00
head big_factorial 2.141 ± 0.018 2.109 2.165 1.03 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.013 ± 0.024 1.973 2.044 1.00
head big_fibonacci 2.069 ± 0.021 2.043 2.121 1.03 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.588 ± 0.430 7.305 8.731 1.00
head blake2s_integration_benchmark 7.822 ± 0.162 7.660 8.169 1.03 ± 0.06
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.127 ± 0.024 2.089 2.171 1.00
head compare_arrays_200000 2.192 ± 0.028 2.159 2.256 1.03 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.413 ± 0.017 1.397 1.446 1.00
head dict_integration_benchmark 1.443 ± 0.035 1.413 1.522 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.240 ± 0.055 1.204 1.361 1.00
head field_arithmetic_get_square_benchmark 1.243 ± 0.021 1.217 1.285 1.00 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.735 ± 0.399 7.434 8.475 1.00
head integration_builtins 7.805 ± 0.086 7.720 8.000 1.01 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.781 ± 0.130 7.511 7.950 1.00
head keccak_integration_benchmark 8.055 ± 0.120 7.939 8.225 1.04 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.128 ± 0.033 2.095 2.207 1.00
head linear_search 2.181 ± 0.015 2.155 2.198 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.499 ± 0.021 1.477 1.551 1.00
head math_cmp_and_pow_integration_benchmark 1.517 ± 0.022 1.500 1.575 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.449 ± 0.022 1.427 1.503 1.00
head math_integration_benchmark 1.457 ± 0.022 1.440 1.515 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.188 ± 0.035 1.163 1.261 1.00
head memory_integration_benchmark 1.231 ± 0.024 1.212 1.278 1.04 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.557 ± 0.035 1.532 1.643 1.00
head operations_with_data_structures_benchmarks 1.559 ± 0.009 1.548 1.576 1.00 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 531.3 ± 8.7 521.9 550.3 1.00 ± 0.02
head pedersen 530.0 ± 6.7 524.7 548.5 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 742.9 ± 5.6 736.6 755.2 1.00
head poseidon_integration_benchmark 753.8 ± 5.9 749.1 767.6 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.836 ± 0.044 1.795 1.918 1.00
head secp_integration_benchmark 1.909 ± 0.073 1.848 2.077 1.04 ± 0.05
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 638.3 ± 2.1 635.2 640.7 1.02 ± 0.01
head set_integration_benchmark 627.3 ± 3.1 623.5 632.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.170 ± 0.055 4.097 4.275 1.00
head uint256_integration_benchmark 4.298 ± 0.057 4.219 4.358 1.03 ± 0.02

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.88%. Comparing base (37ea729) to head (5891caa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1811   +/-   ##
=======================================
  Coverage   94.88%   94.88%           
=======================================
  Files         102      102           
  Lines       40321    40327    +6     
=======================================
+ Hits        38257    38263    +6     
  Misses       2064     2064           

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

@fmoletta fmoletta changed the title fix: Don't asume output builtin is first when counting memory holes fix: Don't assume output builtin is first when counting memory holes Jul 30, 2024
@fmoletta fmoletta marked this pull request as ready for review July 30, 2024 21:22
@pefontana pefontana added this pull request to the merge queue Jul 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 31, 2024
@pefontana pefontana added this pull request to the merge queue Jul 31, 2024
Merged via the queue into main with commit d33589a Jul 31, 2024
73 checks passed
@pefontana pefontana deleted the dont-asume-output-first-memory-hole-count branch July 31, 2024 16:33
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