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

Update docs, cairo-lang-runner references #1854

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

pefontana
Copy link
Member

Update docs

Specify that the implementation of certain Cairo 1 functions are inspired by the cairo-lang-runner crate.

Reference:

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.

@pefontana pefontana added the documentation Improvements or additions to documentation label Oct 16, 2024
@pefontana pefontana changed the title Update docs Update docs, cairo-lang-runner references Oct 16, 2024
Copy link

github-actions bot commented Oct 16, 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 ± σ):     30.131 s ±  0.153 s    [User: 29.366 s, System: 0.764 s]
  Range (min … max):   30.023 s … 30.239 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     29.977 s ±  0.028 s    [User: 29.156 s, System: 0.818 s]
  Range (min … max):   29.957 s … 29.997 s    2 runs
 
Summary
  'hyper_threading_pr threads: 1' ran
    1.01 ± 0.01 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 ± σ):     17.027 s ±  0.419 s    [User: 29.658 s, System: 0.779 s]
  Range (min … max):   16.731 s … 17.323 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     16.730 s ±  0.063 s    [User: 29.293 s, System: 0.818 s]
  Range (min … max):   16.686 s … 16.774 s    2 runs
 
Summary
  'hyper_threading_pr threads: 2' ran
    1.02 ± 0.03 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 ± σ):     12.100 s ±  0.070 s    [User: 41.175 s, System: 0.997 s]
  Range (min … max):   12.051 s … 12.149 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     11.947 s ±  0.074 s    [User: 41.476 s, System: 1.018 s]
  Range (min … max):   11.895 s … 11.999 s    2 runs
 
Summary
  'hyper_threading_pr threads: 4' ran
    1.01 ± 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 ± σ):     11.426 s ±  0.119 s    [User: 41.549 s, System: 1.071 s]
  Range (min … max):   11.342 s … 11.510 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.407 s ±  0.511 s    [User: 42.031 s, System: 1.002 s]
  Range (min … max):   11.046 s … 11.769 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.00 ± 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.402 s ±  0.067 s    [User: 41.708 s, System: 1.036 s]
  Range (min … max):   11.354 s … 11.449 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     11.355 s ±  0.003 s    [User: 42.267 s, System: 0.980 s]
  Range (min … max):   11.353 s … 11.357 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.244 s ±  0.099 s    [User: 42.288 s, System: 1.139 s]
  Range (min … max):   11.174 s … 11.315 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.151 s ±  0.008 s    [User: 42.491 s, System: 1.069 s]
  Range (min … max):   11.146 s … 11.157 s    2 runs
 
Summary
  'hyper_threading_pr threads: 16' ran
    1.01 ± 0.01 times faster than 'hyper_threading_main threads: 16'


Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.32%. Comparing base (3fb0344) to head (89178e8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1854   +/-   ##
=======================================
  Coverage   96.32%   96.32%           
=======================================
  Files         102      102           
  Lines       40381    40381           
=======================================
  Hits        38899    38899           
  Misses       1482     1482           

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

Copy link

github-actions bot commented Oct 16, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.561 ± 0.109 2.423 2.843 1.03 ± 0.05
head big_factorial 2.495 ± 0.038 2.455 2.563 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.444 ± 0.047 2.393 2.513 1.00
head big_fibonacci 2.530 ± 0.091 2.414 2.669 1.03 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.920 ± 0.337 8.613 9.486 1.02 ± 0.04
head blake2s_integration_benchmark 8.711 ± 0.136 8.527 8.964 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.486 ± 0.051 2.422 2.586 1.00
head compare_arrays_200000 2.503 ± 0.035 2.451 2.560 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.661 ± 0.033 1.611 1.703 1.00
head dict_integration_benchmark 1.670 ± 0.042 1.608 1.721 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.413 ± 0.014 1.398 1.435 1.00
head field_arithmetic_get_square_benchmark 1.419 ± 0.024 1.398 1.477 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.861 ± 0.181 8.517 9.099 1.00
head integration_builtins 8.934 ± 0.163 8.659 9.146 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.181 ± 0.155 8.952 9.409 1.00
head keccak_integration_benchmark 9.365 ± 0.512 8.953 10.395 1.02 ± 0.06
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.760 ± 0.089 2.627 2.916 1.01 ± 0.04
head linear_search 2.739 ± 0.046 2.681 2.833 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.885 ± 0.031 1.823 1.926 1.00
head math_cmp_and_pow_integration_benchmark 1.967 ± 0.021 1.930 2.011 1.04 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.811 ± 0.060 1.705 1.875 1.02 ± 0.04
head math_integration_benchmark 1.783 ± 0.049 1.658 1.835 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.522 ± 0.031 1.461 1.589 1.02 ± 0.03
head memory_integration_benchmark 1.486 ± 0.026 1.429 1.520 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.870 ± 0.027 1.837 1.909 1.01 ± 0.03
head operations_with_data_structures_benchmarks 1.860 ± 0.039 1.798 1.931 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 588.7 ± 10.2 576.6 609.4 1.00
head pedersen 593.2 ± 10.1 582.2 610.3 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 718.3 ± 6.9 707.7 729.1 1.00 ± 0.01
head poseidon_integration_benchmark 714.9 ± 4.1 708.3 721.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.057 ± 0.044 2.012 2.140 1.01 ± 0.03
head secp_integration_benchmark 2.043 ± 0.029 2.008 2.107 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 711.7 ± 4.6 702.7 716.4 1.00
head set_integration_benchmark 714.8 ± 3.5 710.3 722.0 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.942 ± 0.073 4.873 5.120 1.01 ± 0.02
head uint256_integration_benchmark 4.885 ± 0.059 4.805 4.965 1.00

@FrancoGiachetta
Copy link
Contributor

FrancoGiachetta commented Oct 16, 2024

I think the module also needs to be referenced. It's the dict_manager.rs

@pefontana
Copy link
Member Author

I think the module also needs to be referenced. It's the dict_manager.rs

Nice catch @FrancoGiachetta !
done 89178e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants