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

deps: use uv if present #1754

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

deps: use uv if present #1754

wants to merge 6 commits into from

Conversation

Oppen
Copy link
Member

@Oppen Oppen commented May 8, 2024

uv is a compatible pip replacement made in Rust, which runs
significantly faster. It saves about 70 seconds on my M3 when installing
deps.

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.

@Oppen Oppen added the pipelines This PR/issue is exclusively about improving our CI label May 8, 2024
`uv` is a compatible `pip` replacement made in Rust, which runs
significantly faster. It saves about 70 seconds on my M3 when installing
deps.
Copy link

github-actions bot commented May 8, 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 ± σ):     27.186 s ±  0.028 s    [User: 26.447 s, System: 0.738 s]
  Range (min … max):   27.166 s … 27.206 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     27.056 s ±  0.028 s    [User: 26.265 s, System: 0.790 s]
  Range (min … max):   27.036 s … 27.076 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 ± σ):     14.610 s ±  0.019 s    [User: 26.927 s, System: 0.876 s]
  Range (min … max):   14.596 s … 14.624 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.611 s ±  0.030 s    [User: 26.935 s, System: 0.814 s]
  Range (min … max):   14.590 s … 14.633 s    2 runs
 
Summary
  'hyper_threading_main threads: 2' ran
    1.00 ± 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.758 s ±  0.006 s    [User: 38.796 s, System: 1.046 s]
  Range (min … max):   10.754 s … 10.762 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.672 s ±  0.016 s    [User: 38.774 s, System: 0.923 s]
  Range (min … max):   10.661 s … 10.684 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.773 s ±  0.078 s    [User: 38.939 s, System: 0.992 s]
  Range (min … max):   10.719 s … 10.828 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.852 s ±  0.051 s    [User: 39.066 s, System: 0.949 s]
  Range (min … max):   10.816 s … 10.888 s    2 runs
 
Summary
  'hyper_threading_main threads: 6' ran
    1.01 ± 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 ± σ):     10.848 s ±  0.161 s    [User: 40.505 s, System: 1.018 s]
  Range (min … max):   10.734 s … 10.963 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.454 s ±  0.078 s    [User: 39.389 s, System: 1.035 s]
  Range (min … max):   10.399 s … 10.509 s    2 runs
 
Summary
  'hyper_threading_pr threads: 8' ran
    1.04 ± 0.02 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.448 s ±  0.033 s    [User: 39.847 s, System: 1.060 s]
  Range (min … max):   10.424 s … 10.471 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.579 s ±  0.053 s    [User: 39.698 s, System: 1.066 s]
  Range (min … max):   10.541 s … 10.616 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.01 ± 0.01 times faster than 'hyper_threading_pr threads: 16'


Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.76%. Comparing base (fd14d0d) to head (efaf681).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1754   +/-   ##
=======================================
  Coverage   94.76%   94.76%           
=======================================
  Files         101      101           
  Lines       38804    38804           
=======================================
  Hits        36773    36773           
  Misses       2031     2031           

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

Copy link

github-actions bot commented May 8, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.075 ± 0.033 2.047 2.165 1.01 ± 0.02
head big_factorial 2.051 ± 0.010 2.032 2.070 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.018 ± 0.032 1.996 2.106 1.00 ± 0.03
head big_fibonacci 2.012 ± 0.044 1.981 2.121 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.650 ± 0.129 7.529 7.972 1.00
head blake2s_integration_benchmark 7.855 ± 0.663 7.523 9.737 1.03 ± 0.09
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.145 ± 0.019 2.128 2.193 1.00 ± 0.02
head compare_arrays_200000 2.135 ± 0.036 2.106 2.208 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.407 ± 0.003 1.401 1.412 1.00
head dict_integration_benchmark 1.411 ± 0.017 1.399 1.454 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.288 ± 0.019 1.272 1.333 1.00
head field_arithmetic_get_square_benchmark 1.306 ± 0.014 1.288 1.328 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.639 ± 0.078 7.531 7.790 1.00 ± 0.01
head integration_builtins 7.611 ± 0.053 7.514 7.676 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.943 ± 0.060 7.841 8.053 1.01 ± 0.01
head keccak_integration_benchmark 7.897 ± 0.100 7.761 8.056 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.131 ± 0.048 2.087 2.232 1.01 ± 0.04
head linear_search 2.110 ± 0.069 2.079 2.301 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.693 ± 0.008 1.680 1.702 1.00
head math_cmp_and_pow_integration_benchmark 1.697 ± 0.035 1.681 1.795 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.604 ± 0.009 1.593 1.624 1.00 ± 0.01
head math_integration_benchmark 1.602 ± 0.015 1.589 1.640 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.213 ± 0.016 1.199 1.238 1.02 ± 0.02
head memory_integration_benchmark 1.195 ± 0.009 1.185 1.217 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.831 ± 0.057 1.803 1.991 1.02 ± 0.03
head operations_with_data_structures_benchmarks 1.804 ± 0.005 1.794 1.810 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 517.1 ± 5.9 512.8 532.9 1.00 ± 0.02
head pedersen 515.7 ± 6.6 511.6 533.2 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 946.6 ± 3.9 943.0 952.3 1.00 ± 0.01
head poseidon_integration_benchmark 946.6 ± 6.1 940.2 958.3 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.853 ± 0.007 1.844 1.867 1.00
head secp_integration_benchmark 1.862 ± 0.014 1.841 1.889 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 642.2 ± 5.5 638.5 657.3 1.00
head set_integration_benchmark 644.1 ± 12.0 636.7 676.6 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.263 ± 0.033 4.183 4.295 1.01 ± 0.02
head uint256_integration_benchmark 4.204 ± 0.055 4.138 4.313 1.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipelines This PR/issue is exclusively about improving our CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant