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

Implement extend_additional_data for BuiltinRunner #1726

Merged
merged 14 commits into from
Apr 22, 2024

Conversation

fmoletta
Copy link
Contributor

Needed for #1720

@fmoletta fmoletta marked this pull request as ready for review April 19, 2024 20:55
@@ -508,6 +508,18 @@ impl BuiltinRunner {
}
}

pub fn extend_additional_data(
Copy link
Collaborator

Choose a reason for hiding this comment

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

wen docs

@@ -124,6 +124,19 @@ impl OutputBuiltinRunner {
})
}

pub fn extend_additional_data(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should have some docs about what is the intent of this function

Copy link

github-actions bot commented Apr 19, 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 ± σ):     23.806 s ±  0.017 s    [User: 23.112 s, System: 0.692 s]
  Range (min … max):   23.793 s … 23.818 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     23.717 s ±  0.028 s    [User: 23.032 s, System: 0.684 s]
  Range (min … max):   23.697 s … 23.737 s    2 runs
 
Summary
  'hyper_threading_pr threads: 1' ran
    1.00 ± 0.00 times faster than 'hyper_threading_main 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 ± σ):     12.382 s ±  0.005 s    [User: 23.659 s, System: 0.676 s]
  Range (min … max):   12.378 s … 12.386 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     12.362 s ±  0.081 s    [User: 23.590 s, System: 0.644 s]
  Range (min … max):   12.304 s … 12.419 s    2 runs
 
Summary
  'hyper_threading_pr threads: 2' ran
    1.00 ± 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 ± σ):      9.638 s ±  0.262 s    [User: 34.904 s, System: 1.018 s]
  Range (min … max):    9.453 s …  9.823 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):      9.461 s ±  0.091 s    [User: 35.176 s, System: 0.974 s]
  Range (min … max):    9.397 s …  9.525 s    2 runs
 
Summary
  'hyper_threading_pr threads: 4' ran
    1.02 ± 0.03 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 ± σ):      9.608 s ±  0.041 s    [User: 34.779 s, System: 0.985 s]
  Range (min … max):    9.579 s …  9.638 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):      9.759 s ±  0.076 s    [User: 34.994 s, System: 0.951 s]
  Range (min … max):    9.705 s …  9.812 s    2 runs
 
Summary
  'hyper_threading_main threads: 6' ran
    1.02 ± 0.01 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 ± σ):      9.479 s ±  0.047 s    [User: 35.275 s, System: 0.946 s]
  Range (min … max):    9.445 s …  9.512 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):      9.505 s ±  0.009 s    [User: 35.117 s, System: 1.014 s]
  Range (min … max):    9.499 s …  9.512 s    2 runs
 
Summary
  'hyper_threading_main threads: 8' ran
    1.00 ± 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 ± σ):      9.395 s ±  0.049 s    [User: 35.646 s, System: 1.090 s]
  Range (min … max):    9.360 s …  9.430 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):      9.569 s ±  0.253 s    [User: 35.464 s, System: 1.087 s]
  Range (min … max):    9.390 s …  9.748 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.02 ± 0.03 times faster than 'hyper_threading_pr threads: 16'


Copy link
Collaborator

@juanbono juanbono left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 87.28814% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 94.78%. Comparing base (7eff520) to head (46afb38).

Files Patch % Lines
vm/src/vm/runners/builtin_runner/mod.rs 0.00% 10 Missing ⚠️
vm/src/vm/runners/builtin_runner/hash.rs 93.33% 2 Missing ⚠️
vm/src/vm/runners/builtin_runner/signature.rs 95.55% 2 Missing ⚠️
vm/src/vm/runners/builtin_runner/output.rs 96.96% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1726      +/-   ##
==========================================
- Coverage   94.81%   94.78%   -0.03%     
==========================================
  Files         100      100              
  Lines       38207    38322     +115     
==========================================
+ Hits        36225    36325     +100     
- Misses       1982     1997      +15     

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

Copy link

github-actions bot commented Apr 19, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 1.901 ± 0.019 1.876 1.929 1.00
head big_factorial 1.950 ± 0.052 1.878 2.023 1.03 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 1.853 ± 0.023 1.821 1.893 1.00
head big_fibonacci 1.874 ± 0.046 1.834 1.990 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 6.363 ± 0.070 6.299 6.521 1.00
head blake2s_integration_benchmark 6.607 ± 0.487 6.306 7.530 1.04 ± 0.08
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 1.920 ± 0.014 1.887 1.938 1.00 ± 0.01
head compare_arrays_200000 1.914 ± 0.018 1.895 1.941 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.303 ± 0.014 1.285 1.324 1.00
head dict_integration_benchmark 1.325 ± 0.036 1.295 1.419 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.184 ± 0.043 1.151 1.284 1.02 ± 0.04
head field_arithmetic_get_square_benchmark 1.165 ± 0.020 1.144 1.214 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 6.463 ± 0.066 6.375 6.555 1.00
head integration_builtins 6.551 ± 0.194 6.401 6.975 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 6.688 ± 0.164 6.561 7.120 1.00
head keccak_integration_benchmark 6.772 ± 0.415 6.562 7.926 1.01 ± 0.07
Command Mean [s] Min [s] Max [s] Relative
base linear_search 1.936 ± 0.030 1.900 1.992 1.00
head linear_search 1.945 ± 0.019 1.915 1.967 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.660 ± 0.010 1.647 1.681 1.00
head math_cmp_and_pow_integration_benchmark 1.673 ± 0.016 1.655 1.699 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.461 ± 0.023 1.441 1.516 1.00
head math_integration_benchmark 1.471 ± 0.026 1.449 1.540 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.132 ± 0.015 1.112 1.160 1.00
head memory_integration_benchmark 1.163 ± 0.059 1.111 1.265 1.03 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.754 ± 0.011 1.740 1.774 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.754 ± 0.013 1.733 1.770 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 503.7 ± 3.7 499.6 511.1 1.00 ± 0.01
head pedersen 501.7 ± 3.6 496.7 509.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 956.3 ± 10.9 940.1 981.6 1.00
head poseidon_integration_benchmark 957.1 ± 7.5 946.4 974.7 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.720 ± 0.017 1.698 1.752 1.00
head secp_integration_benchmark 1.769 ± 0.026 1.727 1.818 1.03 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 692.8 ± 6.1 685.5 702.8 1.02 ± 0.01
head set_integration_benchmark 682.5 ± 3.4 677.4 686.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.723 ± 0.046 3.673 3.796 1.00
head uint256_integration_benchmark 3.798 ± 0.150 3.691 4.196 1.02 ± 0.04

@juanbono juanbono enabled auto-merge April 19, 2024 21:44
@fmoletta fmoletta disabled auto-merge April 19, 2024 21:45
@fmoletta fmoletta enabled auto-merge April 19, 2024 21:46
@fmoletta fmoletta added this pull request to the merge queue Apr 22, 2024
Merged via the queue into main with commit 1a46c9f Apr 22, 2024
70 of 71 checks passed
@fmoletta fmoletta deleted the extend-additional-data branch April 22, 2024 22:22
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