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 broken num-prime crate #1873

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Fix broken num-prime crate #1873

merged 3 commits into from
Nov 14, 2024

Conversation

edg-l
Copy link
Contributor

@edg-l edg-l commented Nov 14, 2024

TITLE

Description

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

Copy link

github-actions bot commented Nov 14, 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 ± σ):     32.115 s ±  0.163 s    [User: 31.369 s, System: 0.744 s]
  Range (min … max):   31.999 s … 32.230 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     32.618 s ±  0.247 s    [User: 31.817 s, System: 0.799 s]
  Range (min … max):   32.443 s … 32.792 s    2 runs
 
Summary
  'hyper_threading_main threads: 1' ran
    1.02 ± 0.01 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 ± σ):     17.694 s ±  0.010 s    [User: 31.014 s, System: 0.704 s]
  Range (min … max):   17.687 s … 17.701 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     18.018 s ±  0.046 s    [User: 31.456 s, System: 0.736 s]
  Range (min … max):   17.985 s … 18.050 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 ± σ):     11.914 s ±  0.253 s    [User: 43.505 s, System: 0.955 s]
  Range (min … max):   11.736 s … 12.093 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     12.253 s ±  0.582 s    [User: 43.307 s, System: 0.916 s]
  Range (min … max):   11.842 s … 12.665 s    2 runs
 
Summary
  'hyper_threading_main threads: 4' ran
    1.03 ± 0.05 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 ± σ):     12.239 s ±  0.620 s    [User: 43.277 s, System: 0.951 s]
  Range (min … max):   11.801 s … 12.678 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.795 s ±  0.001 s    [User: 43.915 s, System: 0.965 s]
  Range (min … max):   11.794 s … 11.796 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.04 ± 0.05 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 ± σ):     11.975 s ±  0.151 s    [User: 43.651 s, System: 1.030 s]
  Range (min … max):   11.868 s … 12.082 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     11.939 s ±  0.039 s    [User: 43.838 s, System: 1.004 s]
  Range (min … max):   11.912 s … 11.966 s    2 runs
 
Summary
  'hyper_threading_pr threads: 8' ran
    1.00 ± 0.01 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 ± σ):     11.765 s ±  0.293 s    [User: 44.078 s, System: 1.068 s]
  Range (min … max):   11.558 s … 11.972 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.859 s ±  0.203 s    [User: 44.300 s, System: 0.969 s]
  Range (min … max):   11.715 s … 12.002 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.01 ± 0.03 times faster than 'hyper_threading_pr threads: 16'


Copy link

github-actions bot commented Nov 14, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.484 ± 0.012 2.451 2.494 1.00
head big_factorial 2.490 ± 0.038 2.461 2.571 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.427 ± 0.023 2.401 2.473 1.00
head big_fibonacci 2.445 ± 0.050 2.414 2.586 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 9.074 ± 0.063 8.988 9.155 1.00
head blake2s_integration_benchmark 9.230 ± 0.249 9.017 9.721 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.560 ± 0.017 2.542 2.603 1.00
head compare_arrays_200000 2.562 ± 0.015 2.541 2.599 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.694 ± 0.045 1.656 1.808 1.01 ± 0.03
head dict_integration_benchmark 1.679 ± 0.017 1.659 1.714 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.426 ± 0.021 1.414 1.482 1.00
head field_arithmetic_get_square_benchmark 1.429 ± 0.010 1.421 1.458 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 9.307 ± 0.320 9.113 10.164 1.01 ± 0.04
head integration_builtins 9.174 ± 0.062 9.074 9.240 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.479 ± 0.089 9.371 9.695 1.00
head keccak_integration_benchmark 9.519 ± 0.153 9.378 9.934 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.565 ± 0.019 2.535 2.589 1.00
head linear_search 2.572 ± 0.030 2.540 2.615 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.741 ± 0.037 1.706 1.804 1.00 ± 0.03
head math_cmp_and_pow_integration_benchmark 1.738 ± 0.033 1.715 1.825 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.698 ± 0.042 1.658 1.803 1.00
head math_integration_benchmark 1.712 ± 0.034 1.675 1.761 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.421 ± 0.015 1.400 1.453 1.00
head memory_integration_benchmark 1.431 ± 0.028 1.406 1.503 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.805 ± 0.028 1.782 1.854 1.00
head operations_with_data_structures_benchmarks 1.832 ± 0.043 1.797 1.929 1.01 ± 0.03
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 592.5 ± 4.0 587.3 602.0 1.00
head pedersen 596.4 ± 7.4 587.0 612.7 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 695.5 ± 9.3 685.2 713.6 1.00 ± 0.02
head poseidon_integration_benchmark 692.3 ± 5.0 682.2 698.3 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.061 ± 0.018 2.049 2.108 1.00
head secp_integration_benchmark 2.092 ± 0.023 2.067 2.143 1.02 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 700.6 ± 7.8 693.5 717.0 1.00
head set_integration_benchmark 700.6 ± 8.1 693.4 719.0 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 5.031 ± 0.072 4.963 5.196 1.00
head uint256_integration_benchmark 5.043 ± 0.035 5.001 5.126 1.00 ± 0.02

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.33%. Comparing base (4bd5794) to head (5fcf343).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1873   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files         102      102           
  Lines       40427    40427           
=======================================
  Hits        38944    38944           
  Misses       1483     1483           

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

@FrancoGiachetta FrancoGiachetta added this pull request to the merge queue Nov 14, 2024
Merged via the queue into main with commit 0d86936 Nov 14, 2024
73 checks passed
@FrancoGiachetta FrancoGiachetta deleted the fix_prime_crate branch November 14, 2024 19:57
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